/**
 *
 */
import Util;
import OpenApi;
import OpenApiUtil;
import EndpointUtil;

extends OpenApi;


init(config: OpenApi.Config){
  super(config);
  @endpointRule = 'regional';
  
  checkConfig(config);
  @endpoint = getEndpoint('outboundbot', @regionId, @endpointRule, @network, @suffix, @endpointMap, @endpoint);
}

function getEndpoint(productId: string, regionId: string, endpointRule: string, network: string, suffix: string, endpointMap: map[string]string, endpoint: string) throws: string{
  if (!Util.empty(endpoint)) {
    return endpoint;
  }
  
  if (!Util.isUnset(endpointMap) && !Util.empty(endpointMap[regionId])) {
    return endpointMap[regionId];
  }
  return EndpointUtil.getEndpointRules(productId, regionId, endpointRule, network, suffix);
}

model ApplyNumberDistrictInfoParsingResultRequest {
  versionId?: string(name='VersionId', example='ffaaa8f0-2de1-438c-ba66-5ac30d83a304'),
}

model ApplyNumberDistrictInfoParsingResultResponseBody = {
  code?: string(name='Code', example='OK'),
  httpStatusCode?: int32(name='HttpStatusCode', example='200'),
  message?: string(name='Message', example='Success'),
  requestId?: string(name='RequestId', example='91102861-AEB9-56C5-8F3A-A023A0E8B5F3'),
  success?: boolean(name='Success', example='true'),
}

model ApplyNumberDistrictInfoParsingResultResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: ApplyNumberDistrictInfoParsingResultResponseBody(name='body'),
}

/**
 * @summary 生效号码库解析结果
 *
 * @param request ApplyNumberDistrictInfoParsingResultRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return ApplyNumberDistrictInfoParsingResultResponse
 */
async function applyNumberDistrictInfoParsingResultWithOptions(request: ApplyNumberDistrictInfoParsingResultRequest, runtime: Util.RuntimeOptions): ApplyNumberDistrictInfoParsingResultResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.versionId)) {
    query['VersionId'] = request.versionId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'ApplyNumberDistrictInfoParsingResult',
    version = '2019-12-26',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 生效号码库解析结果
 *
 * @param request ApplyNumberDistrictInfoParsingResultRequest
 * @return ApplyNumberDistrictInfoParsingResultResponse
 */
async function applyNumberDistrictInfoParsingResult(request: ApplyNumberDistrictInfoParsingResultRequest): ApplyNumberDistrictInfoParsingResultResponse {
  var runtime = new Util.RuntimeOptions{};
  return applyNumberDistrictInfoParsingResultWithOptions(request, runtime);
}

model AssignJobsRequest {
  callingNumber?: [ string ](name='CallingNumber'),
  instanceId?: string(name='InstanceId', description='This parameter is required.', example='12f3dd08-0c55-44ce-9b64-e69d35ed3a76'),
  isAsynchrony?: boolean(name='IsAsynchrony', example='false'),
  jobDataParsingTaskId?: string(name='JobDataParsingTaskId', example='d004cfd2-6a81-491c-83c6-cbe186620c95'),
  jobGroupId?: string(name='JobGroupId', description='This parameter is required.', example='d004cfd2-6a81-491c-83c6-cbe186620c95'),
  jobsJson?: [ string ](name='JobsJson'),
  rosterType?: string(name='RosterType', example='json'),
  strategyJson?: string(name='StrategyJson'),
}

model AssignJobsResponseBody = {
  code?: string(name='Code', example='OK'),
  httpStatusCode?: int32(name='HttpStatusCode', example='200'),
  jobGroupId?: string(name='JobGroupId', example='390515b5-6115-4ccf-83e2-52d5bfaf2ddf'),
  jobsId?: [ string ](name='JobsId'),
  message?: string(name='Message', example='Success'),
  requestId?: string(name='RequestId', example='254EB995-DEDF-48A4-9101-9CA5B72FFBCC'),
  success?: boolean(name='Success', example='true'),
}

model AssignJobsResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: AssignJobsResponseBody(name='body'),
}

/**
 * @param request AssignJobsRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return AssignJobsResponse
 */
async function assignJobsWithOptions(request: AssignJobsRequest, runtime: Util.RuntimeOptions): AssignJobsResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.callingNumber)) {
    query['CallingNumber'] = request.callingNumber;
  }
  if (!Util.isUnset(request.instanceId)) {
    query['InstanceId'] = request.instanceId;
  }
  if (!Util.isUnset(request.isAsynchrony)) {
    query['IsAsynchrony'] = request.isAsynchrony;
  }
  if (!Util.isUnset(request.jobDataParsingTaskId)) {
    query['JobDataParsingTaskId'] = request.jobDataParsingTaskId;
  }
  if (!Util.isUnset(request.jobGroupId)) {
    query['JobGroupId'] = request.jobGroupId;
  }
  if (!Util.isUnset(request.jobsJson)) {
    query['JobsJson'] = request.jobsJson;
  }
  if (!Util.isUnset(request.rosterType)) {
    query['RosterType'] = request.rosterType;
  }
  if (!Util.isUnset(request.strategyJson)) {
    query['StrategyJson'] = request.strategyJson;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'AssignJobs',
    version = '2019-12-26',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @param request AssignJobsRequest
 * @return AssignJobsResponse
 */
async function assignJobs(request: AssignJobsRequest): AssignJobsResponse {
  var runtime = new Util.RuntimeOptions{};
  return assignJobsWithOptions(request, runtime);
}

model CancelJobsRequest {
  all?: boolean(name='All', description='This parameter is required.', example='false'),
  instanceId?: string(name='InstanceId', description='This parameter is required.', example='174952ab-9825-4cc9-a5e2-de82d7fa4cdd'),
  jobGroupId?: string(name='JobGroupId', example='9f84892d-721a-4069-9975-668c8164d64e'),
  jobId?: [ string ](name='JobId', example='edf45790-7200-4cbc-b157-8c0a5f400b75'),
  jobReferenceId?: [ string ](name='JobReferenceId', example='4a875676-b136-4087-88b4-de67c61fed69'),
  scenarioId?: string(name='ScenarioId', example='9cef0dd3-b9d6-4748-9a6f-77a8c3402bb1'),
}

model CancelJobsResponseBody = {
  code?: string(name='Code', example='OK'),
  httpStatusCode?: int32(name='HttpStatusCode', example='200'),
  message?: string(name='Message', example='Success'),
  requestId?: string(name='RequestId', example='254EB995-DEDF-48A4-9101-9CA5B72FFBCC'),
  success?: boolean(name='Success', example='true'),
}

model CancelJobsResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: CancelJobsResponseBody(name='body'),
}

/**
 * @param request CancelJobsRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return CancelJobsResponse
 */
async function cancelJobsWithOptions(request: CancelJobsRequest, runtime: Util.RuntimeOptions): CancelJobsResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.all)) {
    query['All'] = request.all;
  }
  if (!Util.isUnset(request.instanceId)) {
    query['InstanceId'] = request.instanceId;
  }
  if (!Util.isUnset(request.jobGroupId)) {
    query['JobGroupId'] = request.jobGroupId;
  }
  if (!Util.isUnset(request.jobId)) {
    query['JobId'] = request.jobId;
  }
  if (!Util.isUnset(request.jobReferenceId)) {
    query['JobReferenceId'] = request.jobReferenceId;
  }
  if (!Util.isUnset(request.scenarioId)) {
    query['ScenarioId'] = request.scenarioId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'CancelJobs',
    version = '2019-12-26',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @param request CancelJobsRequest
 * @return CancelJobsResponse
 */
async function cancelJobs(request: CancelJobsRequest): CancelJobsResponse {
  var runtime = new Util.RuntimeOptions{};
  return cancelJobsWithOptions(request, runtime);
}

model ChangeResourceGroupRequest {
  newResourceGroupId?: string(name='NewResourceGroupId', description='This parameter is required.', example='rg-aeky6wvb7yzabqy'),
  resourceId?: string(name='ResourceId', description='This parameter is required.', example='ResourceId.1=b949ae1f-01dc-4191-ae5a-70fbe6772fd8'),
}

model ChangeResourceGroupResponseBody = {
  code?: string(name='Code', example='OK'),
  httpStatusCode?: int32(name='HttpStatusCode', example='200'),
  message?: string(name='Message', example='Success'),
  requestId?: string(name='RequestId', example='254EB995-DEDF-48A4-9101-9CA5B72FFBCC'),
  success?: boolean(name='Success', example='true'),
}

model ChangeResourceGroupResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: ChangeResourceGroupResponseBody(name='body'),
}

/**
 * @param request ChangeResourceGroupRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return ChangeResourceGroupResponse
 */
async function changeResourceGroupWithOptions(request: ChangeResourceGroupRequest, runtime: Util.RuntimeOptions): ChangeResourceGroupResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.newResourceGroupId)) {
    query['NewResourceGroupId'] = request.newResourceGroupId;
  }
  if (!Util.isUnset(request.resourceId)) {
    query['ResourceId'] = request.resourceId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'ChangeResourceGroup',
    version = '2019-12-26',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @param request ChangeResourceGroupRequest
 * @return ChangeResourceGroupResponse
 */
async function changeResourceGroup(request: ChangeResourceGroupRequest): ChangeResourceGroupResponse {
  var runtime = new Util.RuntimeOptions{};
  return changeResourceGroupWithOptions(request, runtime);
}

model CreateAgentProfileRequest {
  agentProfileTemplateId?: string(name='AgentProfileTemplateId', description='This parameter is required.', example='default-survey'),
  appIp?: string(name='AppIp', example='127.0.0.1'),
  description?: string(name='Description'),
  faqCategoryIds?: string(name='FaqCategoryIds', example='[30000474726]'),
  instanceId?: string(name='InstanceId', description='This parameter is required.', example='af81a389-91f0-4157-8d82-720edd02b66a'),
  instructionJson?: string(name='InstructionJson', example='[{\\\\"type\\\\":\\\\"TransferToAgent\\\\",\\\\"instructions\\\\":[{\\\\"code\\\\":\\\\"Transfer0\\\\",\\\\"skillGroupId\\\\":\\\\"123\\\\",\\\\"skillGroupName\\\\":\\\\"123\\\\"}]'),
  labelsJson?: string(name='LabelsJson'),
  model?: string(name='Model', description='This parameter is required.', example='model_001'),
  modelConfig?: string(name='ModelConfig', example='""'),
  prompt?: string(name='Prompt'),
  promptJson?: string(name='PromptJson'),
  scenario?: string(name='Scenario'),
  scriptId?: string(name='ScriptId', description='This parameter is required.', example='aa279896-64a6-4182-864c-4f2b04ec8d17'),
  variablesJson?: string(name='VariablesJson'),
}

model CreateAgentProfileResponseBody = {
  code?: string(name='Code', example='Ok'),
  data?: {
    agentProfileId?: string(name='AgentProfileId', example='37ca3ca1ac4b4e57adf3da5b5d939d04'),
    agentProfileTemplateId?: string(name='AgentProfileTemplateId', example='default-survey'),
    agentType?: string(name='AgentType', description='agent type', example='“”'),
    createTime?: string(name='CreateTime', example='1739333534000'),
    description?: string(name='Description'),
    instanceId?: string(name='InstanceId', example='1e16c663-0339-4064-9d57-07f772e78f21'),
    instructionJson?: string(name='InstructionJson', example='[{\\\\"type\\\\":\\\\"TransferToAgent\\\\",\\\\"instructions\\\\":[{\\\\"code\\\\":\\\\"Transfer0\\\\",\\\\"skillGroupId\\\\":\\\\"123\\\\",\\\\"skillGroupName\\\\":\\\\"123\\\\"}]'),
    labelsJson?: string(name='LabelsJson'),
    model?: string(name='Model', example='model_001'),
    modelConfig?: string(name='ModelConfig', example='""'),
    prompt?: string(name='Prompt', example='prompt'),
    promptJson?: string(name='PromptJson'),
    scenario?: string(name='Scenario'),
    scriptId?: string(name='ScriptId', example='d13ad2d3-3fe6-4352-b38b-bd6559047de8'),
    system?: boolean(name='System', example='True'),
    updateTime?: string(name='UpdateTime', example='1737077564000'),
    variablesJson?: string(name='VariablesJson'),
  }(name='Data'),
  httpStatusCode?: int32(name='HttpStatusCode', example='200'),
  message?: string(name='Message', example='Success'),
  requestId?: string(name='RequestId', example='254EB995-DEDF-48A4-9101-9CA5B72FFBCC'),
  success?: boolean(name='Success', example='true'),
}

model CreateAgentProfileResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: CreateAgentProfileResponseBody(name='body'),
}

/**
 * @param request CreateAgentProfileRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return CreateAgentProfileResponse
 */
async function createAgentProfileWithOptions(request: CreateAgentProfileRequest, runtime: Util.RuntimeOptions): CreateAgentProfileResponse {
  Util.validateModel(request);
  var body : map[string]any = {};
  if (!Util.isUnset(request.agentProfileTemplateId)) {
    body['AgentProfileTemplateId'] = request.agentProfileTemplateId;
  }
  if (!Util.isUnset(request.appIp)) {
    body['AppIp'] = request.appIp;
  }
  if (!Util.isUnset(request.description)) {
    body['Description'] = request.description;
  }
  if (!Util.isUnset(request.faqCategoryIds)) {
    body['FaqCategoryIds'] = request.faqCategoryIds;
  }
  if (!Util.isUnset(request.instanceId)) {
    body['InstanceId'] = request.instanceId;
  }
  if (!Util.isUnset(request.instructionJson)) {
    body['InstructionJson'] = request.instructionJson;
  }
  if (!Util.isUnset(request.labelsJson)) {
    body['LabelsJson'] = request.labelsJson;
  }
  if (!Util.isUnset(request.model)) {
    body['Model'] = request.model;
  }
  if (!Util.isUnset(request.modelConfig)) {
    body['ModelConfig'] = request.modelConfig;
  }
  if (!Util.isUnset(request.prompt)) {
    body['Prompt'] = request.prompt;
  }
  if (!Util.isUnset(request.promptJson)) {
    body['PromptJson'] = request.promptJson;
  }
  if (!Util.isUnset(request.scenario)) {
    body['Scenario'] = request.scenario;
  }
  if (!Util.isUnset(request.scriptId)) {
    body['ScriptId'] = request.scriptId;
  }
  if (!Util.isUnset(request.variablesJson)) {
    body['VariablesJson'] = request.variablesJson;
  }
  var req = new OpenApi.OpenApiRequest{ 
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'CreateAgentProfile',
    version = '2019-12-26',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @param request CreateAgentProfileRequest
 * @return CreateAgentProfileResponse
 */
async function createAgentProfile(request: CreateAgentProfileRequest): CreateAgentProfileResponse {
  var runtime = new Util.RuntimeOptions{};
  return createAgentProfileWithOptions(request, runtime);
}

model CreateAnnotationMissionRequest {
  agentId?: string(name='AgentId', example='1168702'),
  agentKey?: string(name='AgentKey', example='9137ab9c27044921860030adf8590ec4_p_outbound_public'),
  annotationMissionDataSourceType?: int32(name='AnnotationMissionDataSourceType', example='1'),
  annotationMissionDebugDataSourceList?: [ int32 ](name='AnnotationMissionDebugDataSourceList'),
  annotationMissionDebugDataSourceListJsonString?: string(name='AnnotationMissionDebugDataSourceListJsonString', example='[1]'),
  annotationMissionName?: string(name='AnnotationMissionName'),
  chatbotId?: string(name='ChatbotId', example='chatbot-cn-fqEnFZBYnb'),
  conversationTimeEndFilter?: long(name='ConversationTimeEndFilter', example='1682956800000'),
  conversationTimeStartFilter?: long(name='ConversationTimeStartFilter', example='1683302400000'),
  excludeOtherSession?: boolean(name='ExcludeOtherSession', example='true'),
  finished?: boolean(name='Finished', example='True'),
  instanceId?: string(name='InstanceId', example='bf3b51a5-e88a-4636-98b0-1a34725a085b'),
  samplingCount?: int32(name='SamplingCount', example='1'),
  samplingRate?: int32(name='SamplingRate', example='1'),
  samplingType?: int32(name='SamplingType', example='1'),
  scriptId?: string(name='ScriptId', example='6236f21e-2e04-4dad-a47b-ae77e6a48325'),
  sessionEndReasonFilterList?: [ int32 ](name='SessionEndReasonFilterList'),
  sessionEndReasonFilterListJsonString?: string(name='SessionEndReasonFilterListJsonString', example='[1]'),
}

model CreateAnnotationMissionShrinkRequest {
  agentId?: string(name='AgentId', example='1168702'),
  agentKey?: string(name='AgentKey', example='9137ab9c27044921860030adf8590ec4_p_outbound_public'),
  annotationMissionDataSourceType?: int32(name='AnnotationMissionDataSourceType', example='1'),
  annotationMissionDebugDataSourceListShrink?: string(name='AnnotationMissionDebugDataSourceList'),
  annotationMissionDebugDataSourceListJsonString?: string(name='AnnotationMissionDebugDataSourceListJsonString', example='[1]'),
  annotationMissionName?: string(name='AnnotationMissionName'),
  chatbotId?: string(name='ChatbotId', example='chatbot-cn-fqEnFZBYnb'),
  conversationTimeEndFilter?: long(name='ConversationTimeEndFilter', example='1682956800000'),
  conversationTimeStartFilter?: long(name='ConversationTimeStartFilter', example='1683302400000'),
  excludeOtherSession?: boolean(name='ExcludeOtherSession', example='true'),
  finished?: boolean(name='Finished', example='True'),
  instanceId?: string(name='InstanceId', example='bf3b51a5-e88a-4636-98b0-1a34725a085b'),
  samplingCount?: int32(name='SamplingCount', example='1'),
  samplingRate?: int32(name='SamplingRate', example='1'),
  samplingType?: int32(name='SamplingType', example='1'),
  scriptId?: string(name='ScriptId', example='6236f21e-2e04-4dad-a47b-ae77e6a48325'),
  sessionEndReasonFilterList?: [ int32 ](name='SessionEndReasonFilterList'),
  sessionEndReasonFilterListJsonString?: string(name='SessionEndReasonFilterListJsonString', example='[1]'),
}

model CreateAnnotationMissionResponseBody = {
  code?: string(name='Code', example='OK'),
  data?: {
    message?: string(name='Message'),
    success?: boolean(name='Success', example='True'),
  }(name='Data'),
  httpStatusCode?: int32(name='HttpStatusCode', example='200'),
  message?: string(name='Message'),
  requestId?: string(name='RequestId', example='254EB995-DEDF-48A4-9101-9CA5B72FFBCC'),
  success?: boolean(name='Success', example='True'),
}

model CreateAnnotationMissionResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: CreateAnnotationMissionResponseBody(name='body'),
}

/**
 * @param tmpReq CreateAnnotationMissionRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return CreateAnnotationMissionResponse
 */
async function createAnnotationMissionWithOptions(tmpReq: CreateAnnotationMissionRequest, runtime: Util.RuntimeOptions): CreateAnnotationMissionResponse {
  Util.validateModel(tmpReq);
  var request = new CreateAnnotationMissionShrinkRequest{};
  OpenApiUtil.convert(tmpReq, request);
  if (!Util.isUnset(tmpReq.annotationMissionDebugDataSourceList)) {
    request.annotationMissionDebugDataSourceListShrink = OpenApiUtil.arrayToStringWithSpecifiedStyle(tmpReq.annotationMissionDebugDataSourceList, 'AnnotationMissionDebugDataSourceList', 'json');
  }
  var query = {};
  if (!Util.isUnset(request.agentId)) {
    query['AgentId'] = request.agentId;
  }
  if (!Util.isUnset(request.agentKey)) {
    query['AgentKey'] = request.agentKey;
  }
  if (!Util.isUnset(request.annotationMissionDataSourceType)) {
    query['AnnotationMissionDataSourceType'] = request.annotationMissionDataSourceType;
  }
  if (!Util.isUnset(request.annotationMissionDebugDataSourceListShrink)) {
    query['AnnotationMissionDebugDataSourceList'] = request.annotationMissionDebugDataSourceListShrink;
  }
  if (!Util.isUnset(request.annotationMissionDebugDataSourceListJsonString)) {
    query['AnnotationMissionDebugDataSourceListJsonString'] = request.annotationMissionDebugDataSourceListJsonString;
  }
  if (!Util.isUnset(request.annotationMissionName)) {
    query['AnnotationMissionName'] = request.annotationMissionName;
  }
  if (!Util.isUnset(request.chatbotId)) {
    query['ChatbotId'] = request.chatbotId;
  }
  if (!Util.isUnset(request.conversationTimeEndFilter)) {
    query['ConversationTimeEndFilter'] = request.conversationTimeEndFilter;
  }
  if (!Util.isUnset(request.conversationTimeStartFilter)) {
    query['ConversationTimeStartFilter'] = request.conversationTimeStartFilter;
  }
  if (!Util.isUnset(request.excludeOtherSession)) {
    query['ExcludeOtherSession'] = request.excludeOtherSession;
  }
  if (!Util.isUnset(request.finished)) {
    query['Finished'] = request.finished;
  }
  if (!Util.isUnset(request.instanceId)) {
    query['InstanceId'] = request.instanceId;
  }
  if (!Util.isUnset(request.samplingCount)) {
    query['SamplingCount'] = request.samplingCount;
  }
  if (!Util.isUnset(request.samplingRate)) {
    query['SamplingRate'] = request.samplingRate;
  }
  if (!Util.isUnset(request.samplingType)) {
    query['SamplingType'] = request.samplingType;
  }
  if (!Util.isUnset(request.scriptId)) {
    query['ScriptId'] = request.scriptId;
  }
  if (!Util.isUnset(request.sessionEndReasonFilterList)) {
    query['SessionEndReasonFilterList'] = request.sessionEndReasonFilterList;
  }
  if (!Util.isUnset(request.sessionEndReasonFilterListJsonString)) {
    query['SessionEndReasonFilterListJsonString'] = request.sessionEndReasonFilterListJsonString;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'CreateAnnotationMission',
    version = '2019-12-26',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @param request CreateAnnotationMissionRequest
 * @return CreateAnnotationMissionResponse
 */
async function createAnnotationMission(request: CreateAnnotationMissionRequest): CreateAnnotationMissionResponse {
  var runtime = new Util.RuntimeOptions{};
  return createAnnotationMissionWithOptions(request, runtime);
}

model CreateBatchJobsRequest {
  batchJobDescription?: string(name='BatchJobDescription'),
  batchJobName?: string(name='BatchJobName', description='This parameter is required.'),
  callingNumber?: [ string ](name='CallingNumber', example='["95187"]'),
  instanceId?: string(name='InstanceId', description='This parameter is required.', example='174952ab-9825-4cc9-a5e2-de82d7fa4cdd'),
  jobFilePath?: string(name='JobFilePath', example='52e80b02-0126-4556-a1e6-ef5b3747ed53/a9a3ddc7-d7d7-48cd-82b5-b31bb5510e71_2a66f8ad-dfbb-4980-9b84-439171295a11.xlsx'),
  scenarioId?: string(name='ScenarioId', example='c6a668d1-3145-4048-9101-cb3678bb8884'),
  scriptId?: string(name='ScriptId', example='b9ff4e88-65f9-4eb3-987c-11ba51f3f24d'),
  strategyJson?: string(name='StrategyJson'),
  submitted?: boolean(name='Submitted', description='This parameter is required.', example='false'),
}

model CreateBatchJobsResponseBody = {
  batchJob?: {
    batchJobId?: string(name='BatchJobId', example='5a7e8b09-baf9-4cab-b540-c971f47a7146'),
    callingNumbers?: [ string ](name='CallingNumbers'),
    creationTime?: long(name='CreationTime', example='1579068424000'),
    jobFilePath?: string(name='JobFilePath', example='52e80b02-0126-4556-a1e6-ef5b3747ed53/a9a3ddc7-d7d7-48cd-82b5-b31bb5510e71_2a66f8ad-dfbb-4980-9b84-439171295a11.xlsx'),
    jobGroupDescription?: string(name='JobGroupDescription'),
    jobGroupName?: string(name='JobGroupName'),
    scenarioId?: string(name='ScenarioId', example='6cea9bed-63e6-439e-ae4c-b3333efff53d'),
    strategy?: {
      customized?: string(name='Customized', example='{}'),
      endTime?: long(name='EndTime', example='2209702074000'),
      followUpStrategy?: string(name='FollowUpStrategy', example='CONTINUE'),
      isTemplate?: boolean(name='IsTemplate', example='false'),
      maxAttemptsPerDay?: int32(name='MaxAttemptsPerDay', example='3'),
      minAttemptInterval?: int32(name='MinAttemptInterval', example='10'),
      repeatBy?: string(name='RepeatBy', example='Once'),
      repeatDays?: [ string ](name='RepeatDays'),
      routingStrategy?: string(name='RoutingStrategy', example='LocalFirst'),
      startTime?: long(name='StartTime', example='1578550074000'),
      strategyDescription?: string(name='StrategyDescription'),
      strategyId?: string(name='StrategyId', example='f718798d-96be-40e4-bef6-317b54855708'),
      strategyName?: string(name='StrategyName'),
      type?: string(name='Type', example='Repeatable'),
      workingTime?: [ 
        {
          beginTime?: string(name='BeginTime', example='09:00:00'),
          endTime?: string(name='EndTime', example='12:00:00'),
        }
      ](name='WorkingTime'),
    }(name='Strategy'),
  }(name='BatchJob'),
  code?: string(name='Code', example='OK'),
  httpStatusCode?: int32(name='HttpStatusCode', example='200'),
  message?: string(name='Message', example='Success'),
  requestId?: string(name='RequestId', example='254EB995-DEDF-48A4-9101-9CA5B72FFBCC'),
  success?: boolean(name='Success', example='true'),
}

model CreateBatchJobsResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: CreateBatchJobsResponseBody(name='body'),
}

/**
 * @param request CreateBatchJobsRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return CreateBatchJobsResponse
 */
async function createBatchJobsWithOptions(request: CreateBatchJobsRequest, runtime: Util.RuntimeOptions): CreateBatchJobsResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.batchJobDescription)) {
    query['BatchJobDescription'] = request.batchJobDescription;
  }
  if (!Util.isUnset(request.batchJobName)) {
    query['BatchJobName'] = request.batchJobName;
  }
  if (!Util.isUnset(request.callingNumber)) {
    query['CallingNumber'] = request.callingNumber;
  }
  if (!Util.isUnset(request.instanceId)) {
    query['InstanceId'] = request.instanceId;
  }
  if (!Util.isUnset(request.jobFilePath)) {
    query['JobFilePath'] = request.jobFilePath;
  }
  if (!Util.isUnset(request.scenarioId)) {
    query['ScenarioId'] = request.scenarioId;
  }
  if (!Util.isUnset(request.scriptId)) {
    query['ScriptId'] = request.scriptId;
  }
  if (!Util.isUnset(request.strategyJson)) {
    query['StrategyJson'] = request.strategyJson;
  }
  if (!Util.isUnset(request.submitted)) {
    query['Submitted'] = request.submitted;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'CreateBatchJobs',
    version = '2019-12-26',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @param request CreateBatchJobsRequest
 * @return CreateBatchJobsResponse
 */
async function createBatchJobs(request: CreateBatchJobsRequest): CreateBatchJobsResponse {
  var runtime = new Util.RuntimeOptions{};
  return createBatchJobsWithOptions(request, runtime);
}

model CreateBatchRepeatJobRequest {
  callingNumber?: [ string ](name='CallingNumber', example='[]'),
  description?: string(name='Description'),
  filterStatus?: string(name='FilterStatus', example='Succeeded,NoInteraction,Failed,Cancelled'),
  flashSmsExtras?: string(name='FlashSmsExtras'),
  instanceId?: string(name='InstanceId', description='This parameter is required.', example='2bfa5ae4-7185-4227-a3b8-328f26f11be1'),
  minConcurrency?: long(name='MinConcurrency', example='2'),
  name?: string(name='Name', description='This parameter is required.', example='24'),
  priority?: string(name='Priority', example='10'),
  recallCallingNumber?: [ string ](name='RecallCallingNumber'),
  recallStrategyJson?: string(name='RecallStrategyJson', example='{\\\\"emptyNumberIgnore\\\\":false,\\\\"inArrearsIgnore\\\\":false,\\\\"outOfServiceIgnore\\\\":false}'),
  ringingDuration?: long(name='RingingDuration', example='25'),
  scriptId?: string(name='ScriptId', example='0fe7f71c-8771-42ef-9bb1-19aa16ae7120'),
  sourceGroupId?: string(name='SourceGroupId', description='This parameter is required.', example='c4f8a3d3-2e94-4bd4-aef8-e35f663d4847'),
  strategyJson?: string(name='StrategyJson', example='{\\\\"maxAttemptsPerDay\\\\":1,\\\\"minAttemptInterval\\\\":1,\\\\"routingStrategy\\\\":\\\\"LocalFirst\\\\"}'),
}

model CreateBatchRepeatJobResponseBody = {
  code?: string(name='Code', example='OK'),
  httpStatusCode?: int32(name='HttpStatusCode', example='200'),
  jobGroup?: {
    id?: string(name='Id', example='254EB995-DEDF-48A4-9101-9CA5B72FFBCC'),
    minConcurrency?: long(name='MinConcurrency', example='1'),
    priority?: string(name='Priority', example='3'),
    ringingDuration?: long(name='RingingDuration', example='30'),
  }(name='JobGroup', example='{}'),
  message?: string(name='Message', example='Success'),
  requestId?: string(name='RequestId', example='254EB995-DEDF-48A4-9101-9CA5B72FFBCC'),
  success?: boolean(name='Success', example='true'),
}

model CreateBatchRepeatJobResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: CreateBatchRepeatJobResponseBody(name='body'),
}

/**
 * @summary CreateBatchRepeatJob
 *
 * @param request CreateBatchRepeatJobRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return CreateBatchRepeatJobResponse
 */
async function createBatchRepeatJobWithOptions(request: CreateBatchRepeatJobRequest, runtime: Util.RuntimeOptions): CreateBatchRepeatJobResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.callingNumber)) {
    query['CallingNumber'] = request.callingNumber;
  }
  if (!Util.isUnset(request.description)) {
    query['Description'] = request.description;
  }
  if (!Util.isUnset(request.filterStatus)) {
    query['FilterStatus'] = request.filterStatus;
  }
  if (!Util.isUnset(request.flashSmsExtras)) {
    query['FlashSmsExtras'] = request.flashSmsExtras;
  }
  if (!Util.isUnset(request.instanceId)) {
    query['InstanceId'] = request.instanceId;
  }
  if (!Util.isUnset(request.minConcurrency)) {
    query['MinConcurrency'] = request.minConcurrency;
  }
  if (!Util.isUnset(request.name)) {
    query['Name'] = request.name;
  }
  if (!Util.isUnset(request.priority)) {
    query['Priority'] = request.priority;
  }
  if (!Util.isUnset(request.recallCallingNumber)) {
    query['RecallCallingNumber'] = request.recallCallingNumber;
  }
  if (!Util.isUnset(request.recallStrategyJson)) {
    query['RecallStrategyJson'] = request.recallStrategyJson;
  }
  if (!Util.isUnset(request.ringingDuration)) {
    query['RingingDuration'] = request.ringingDuration;
  }
  if (!Util.isUnset(request.scriptId)) {
    query['ScriptId'] = request.scriptId;
  }
  if (!Util.isUnset(request.sourceGroupId)) {
    query['SourceGroupId'] = request.sourceGroupId;
  }
  if (!Util.isUnset(request.strategyJson)) {
    query['StrategyJson'] = request.strategyJson;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'CreateBatchRepeatJob',
    version = '2019-12-26',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary CreateBatchRepeatJob
 *
 * @param request CreateBatchRepeatJobRequest
 * @return CreateBatchRepeatJobResponse
 */
async function createBatchRepeatJob(request: CreateBatchRepeatJobRequest): CreateBatchRepeatJobResponse {
  var runtime = new Util.RuntimeOptions{};
  return createBatchRepeatJobWithOptions(request, runtime);
}

model CreateBeebotIntentRequest {
  instanceId?: string(name='InstanceId', description='This parameter is required.', example='e5035654-1745-484a-8c5b-165f7c7bcd79'),
  intentDefinition?: {
    aliasName?: string(name='AliasName'),
    intentName?: string(name='IntentName', description='This parameter is required.'),
  }(name='IntentDefinition', description='This parameter is required.'),
  scriptId?: string(name='ScriptId', description='This parameter is required.', example='c5c5d8c0-c0f1-48a7-be2b-dc46006d888a'),
}

model CreateBeebotIntentShrinkRequest {
  instanceId?: string(name='InstanceId', description='This parameter is required.', example='e5035654-1745-484a-8c5b-165f7c7bcd79'),
  intentDefinitionShrink?: string(name='IntentDefinition', description='This parameter is required.'),
  scriptId?: string(name='ScriptId', description='This parameter is required.', example='c5c5d8c0-c0f1-48a7-be2b-dc46006d888a'),
}

model CreateBeebotIntentResponseBody = {
  beebotRequestId?: string(name='BeebotRequestId', example='497CFAFF-48CC-161A-AD2C-252DED569037'),
  code?: string(name='Code', example='OK'),
  httpStatusCode?: int32(name='HttpStatusCode', example='200'),
  intentId?: long(name='IntentId', example='10717802'),
  message?: string(name='Message', example='Success'),
  requestId?: string(name='RequestId', example='254EB995-DEDF-48A4-9101-9CA5B72FFBCC'),
  success?: boolean(name='Success', example='true'),
}

model CreateBeebotIntentResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: CreateBeebotIntentResponseBody(name='body'),
}

/**
 * @summary CreateBeebotIntent
 *
 * @param tmpReq CreateBeebotIntentRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return CreateBeebotIntentResponse
 */
async function createBeebotIntentWithOptions(tmpReq: CreateBeebotIntentRequest, runtime: Util.RuntimeOptions): CreateBeebotIntentResponse {
  Util.validateModel(tmpReq);
  var request = new CreateBeebotIntentShrinkRequest{};
  OpenApiUtil.convert(tmpReq, request);
  if (!Util.isUnset(tmpReq.intentDefinition)) {
    request.intentDefinitionShrink = OpenApiUtil.arrayToStringWithSpecifiedStyle(tmpReq.intentDefinition, 'IntentDefinition', 'json');
  }
  var query = {};
  if (!Util.isUnset(request.instanceId)) {
    query['InstanceId'] = request.instanceId;
  }
  if (!Util.isUnset(request.intentDefinitionShrink)) {
    query['IntentDefinition'] = request.intentDefinitionShrink;
  }
  if (!Util.isUnset(request.scriptId)) {
    query['ScriptId'] = request.scriptId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'CreateBeebotIntent',
    version = '2019-12-26',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary CreateBeebotIntent
 *
 * @param request CreateBeebotIntentRequest
 * @return CreateBeebotIntentResponse
 */
async function createBeebotIntent(request: CreateBeebotIntentRequest): CreateBeebotIntentResponse {
  var runtime = new Util.RuntimeOptions{};
  return createBeebotIntentWithOptions(request, runtime);
}

model CreateBeebotIntentLgfRequest {
  instanceId?: string(name='InstanceId', description='This parameter is required.', example='e5035654-1745-484a-8c5b-165f7c7bcd79'),
  lgfDefinition?: {
    intentId?: long(name='IntentId', description='This parameter is required.', example='10717802'),
    ruleText?: string(name='RuleText', description='This parameter is required.'),
  }(name='LgfDefinition', description='This parameter is required.'),
  scriptId?: string(name='ScriptId', description='This parameter is required.', example='c5c5d8c0-c0f1-48a7-be2b-dc46006d888a'),
}

model CreateBeebotIntentLgfShrinkRequest {
  instanceId?: string(name='InstanceId', description='This parameter is required.', example='e5035654-1745-484a-8c5b-165f7c7bcd79'),
  lgfDefinitionShrink?: string(name='LgfDefinition', description='This parameter is required.'),
  scriptId?: string(name='ScriptId', description='This parameter is required.', example='c5c5d8c0-c0f1-48a7-be2b-dc46006d888a'),
}

model CreateBeebotIntentLgfResponseBody = {
  beebotRequestId?: string(name='BeebotRequestId', example='497CFAFF-48CC-161A-AD2C-252DED569037'),
  code?: string(name='Code', example='OK'),
  httpStatusCode?: int32(name='HttpStatusCode', example='200'),
  lgfId?: long(name='LgfId', example='5666117'),
  message?: string(name='Message', example='Success'),
  requestId?: string(name='RequestId', example='254EB995-DEDF-48A4-9101-9CA5B72FFBCC'),
  success?: boolean(name='Success', example='True'),
}

model CreateBeebotIntentLgfResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: CreateBeebotIntentLgfResponseBody(name='body'),
}

/**
 * @summary CreateBeebotIntentLgf
 *
 * @param tmpReq CreateBeebotIntentLgfRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return CreateBeebotIntentLgfResponse
 */
async function createBeebotIntentLgfWithOptions(tmpReq: CreateBeebotIntentLgfRequest, runtime: Util.RuntimeOptions): CreateBeebotIntentLgfResponse {
  Util.validateModel(tmpReq);
  var request = new CreateBeebotIntentLgfShrinkRequest{};
  OpenApiUtil.convert(tmpReq, request);
  if (!Util.isUnset(tmpReq.lgfDefinition)) {
    request.lgfDefinitionShrink = OpenApiUtil.arrayToStringWithSpecifiedStyle(tmpReq.lgfDefinition, 'LgfDefinition', 'json');
  }
  var query = {};
  if (!Util.isUnset(request.instanceId)) {
    query['InstanceId'] = request.instanceId;
  }
  if (!Util.isUnset(request.lgfDefinitionShrink)) {
    query['LgfDefinition'] = request.lgfDefinitionShrink;
  }
  if (!Util.isUnset(request.scriptId)) {
    query['ScriptId'] = request.scriptId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'CreateBeebotIntentLgf',
    version = '2019-12-26',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary CreateBeebotIntentLgf
 *
 * @param request CreateBeebotIntentLgfRequest
 * @return CreateBeebotIntentLgfResponse
 */
async function createBeebotIntentLgf(request: CreateBeebotIntentLgfRequest): CreateBeebotIntentLgfResponse {
  var runtime = new Util.RuntimeOptions{};
  return createBeebotIntentLgfWithOptions(request, runtime);
}

model CreateBeebotIntentUserSayRequest {
  instanceId?: string(name='InstanceId', description='This parameter is required.', example='e5035654-1745-484a-8c5b-165f7c7bcd79'),
  scriptId?: string(name='ScriptId', description='This parameter is required.', example='c5c5d8c0-c0f1-48a7-be2b-dc46006d888a'),
  userSayDefinition?: {
    content?: string(name='Content', description='This parameter is required.'),
    intentId?: long(name='IntentId', description='This parameter is required.', example='10717802'),
  }(name='UserSayDefinition', description='This parameter is required.'),
}

model CreateBeebotIntentUserSayShrinkRequest {
  instanceId?: string(name='InstanceId', description='This parameter is required.', example='e5035654-1745-484a-8c5b-165f7c7bcd79'),
  scriptId?: string(name='ScriptId', description='This parameter is required.', example='c5c5d8c0-c0f1-48a7-be2b-dc46006d888a'),
  userSayDefinitionShrink?: string(name='UserSayDefinition', description='This parameter is required.'),
}

model CreateBeebotIntentUserSayResponseBody = {
  beebotRequestId?: string(name='BeebotRequestId', example='0B219FCB-EC71-1F08-BB1B-0E87C20158C8'),
  code?: string(name='Code', example='OK'),
  httpStatusCode?: int32(name='HttpStatusCode', example='200'),
  message?: string(name='Message', example='Success'),
  requestId?: string(name='RequestId', example='254EB995-DEDF-48A4-9101-9CA5B72FFBCC'),
  success?: boolean(name='Success', example='true'),
  userSayId?: long(name='UserSayId', example='17448458'),
}

model CreateBeebotIntentUserSayResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: CreateBeebotIntentUserSayResponseBody(name='body'),
}

/**
 * @summary CreateBeebotIntentUserSay
 *
 * @param tmpReq CreateBeebotIntentUserSayRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return CreateBeebotIntentUserSayResponse
 */
async function createBeebotIntentUserSayWithOptions(tmpReq: CreateBeebotIntentUserSayRequest, runtime: Util.RuntimeOptions): CreateBeebotIntentUserSayResponse {
  Util.validateModel(tmpReq);
  var request = new CreateBeebotIntentUserSayShrinkRequest{};
  OpenApiUtil.convert(tmpReq, request);
  if (!Util.isUnset(tmpReq.userSayDefinition)) {
    request.userSayDefinitionShrink = OpenApiUtil.arrayToStringWithSpecifiedStyle(tmpReq.userSayDefinition, 'UserSayDefinition', 'json');
  }
  var query = {};
  if (!Util.isUnset(request.instanceId)) {
    query['InstanceId'] = request.instanceId;
  }
  if (!Util.isUnset(request.scriptId)) {
    query['ScriptId'] = request.scriptId;
  }
  if (!Util.isUnset(request.userSayDefinitionShrink)) {
    query['UserSayDefinition'] = request.userSayDefinitionShrink;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'CreateBeebotIntentUserSay',
    version = '2019-12-26',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary CreateBeebotIntentUserSay
 *
 * @param request CreateBeebotIntentUserSayRequest
 * @return CreateBeebotIntentUserSayResponse
 */
async function createBeebotIntentUserSay(request: CreateBeebotIntentUserSayRequest): CreateBeebotIntentUserSayResponse {
  var runtime = new Util.RuntimeOptions{};
  return createBeebotIntentUserSayWithOptions(request, runtime);
}

model CreateDialogueFlowRequest {
  dialogueFlowType?: string(name='DialogueFlowType', description='This parameter is required.', example='MainFlow'),
  dialogueName?: string(name='DialogueName', description='This parameter is required.'),
  instanceId?: string(name='InstanceId', description='This parameter is required.', example='174952ab-9825-4cc9-a5e2-de82d7fa4cdd'),
  scriptId?: string(name='ScriptId', description='This parameter is required.', example='d0bf93dd-1a54-4f00-819e-c75502d38681'),
}

model CreateDialogueFlowResponseBody = {
  code?: string(name='Code', example='OK'),
  dialogueFlowId?: string(name='DialogueFlowId', example='390515b5-6115-4ccf-83e2-52d5bfaf2ddf'),
  httpStatusCode?: int32(name='HttpStatusCode', example='200'),
  message?: string(name='Message', example='Success'),
  requestId?: string(name='RequestId', example='254EB995-DEDF-48A4-9101-9CA5B72FFBCC'),
  success?: boolean(name='Success', example='true'),
}

model CreateDialogueFlowResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: CreateDialogueFlowResponseBody(name='body'),
}

/**
 * @param request CreateDialogueFlowRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return CreateDialogueFlowResponse
 */
async function createDialogueFlowWithOptions(request: CreateDialogueFlowRequest, runtime: Util.RuntimeOptions): CreateDialogueFlowResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.dialogueFlowType)) {
    query['DialogueFlowType'] = request.dialogueFlowType;
  }
  if (!Util.isUnset(request.dialogueName)) {
    query['DialogueName'] = request.dialogueName;
  }
  if (!Util.isUnset(request.instanceId)) {
    query['InstanceId'] = request.instanceId;
  }
  if (!Util.isUnset(request.scriptId)) {
    query['ScriptId'] = request.scriptId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'CreateDialogueFlow',
    version = '2019-12-26',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @param request CreateDialogueFlowRequest
 * @return CreateDialogueFlowResponse
 */
async function createDialogueFlow(request: CreateDialogueFlowRequest): CreateDialogueFlowResponse {
  var runtime = new Util.RuntimeOptions{};
  return createDialogueFlowWithOptions(request, runtime);
}

model CreateDownloadUrlRequest {
  downloadTaskId?: string(name='DownloadTaskId', description='This parameter is required.', example='137da36b41304bcd999a0a7895dc6881'),
  fileId?: string(name='FileId', description='This parameter is required.', example='6f91885fa24b4c408d8f4eb392fd8ae6'),
}

model CreateDownloadUrlResponseBody = {
  code?: string(name='Code', example='OK'),
  fileHttpUrl?: string(name='FileHttpUrl', example='http://www.xxx.com/xxx'),
  httpStatusCode?: int32(name='HttpStatusCode', example='200'),
  message?: string(name='Message', example='Success'),
  requestId?: string(name='RequestId', example='EC08CC41-6870-5594-939A-F758F057898F'),
  success?: boolean(name='Success', example='true'),
}

model CreateDownloadUrlResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: CreateDownloadUrlResponseBody(name='body'),
}

/**
 * @param request CreateDownloadUrlRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return CreateDownloadUrlResponse
 */
async function createDownloadUrlWithOptions(request: CreateDownloadUrlRequest, runtime: Util.RuntimeOptions): CreateDownloadUrlResponse {
  Util.validateModel(request);
  var query = OpenApiUtil.query(Util.toMap(request));
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'CreateDownloadUrl',
    version = '2019-12-26',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'GET',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @param request CreateDownloadUrlRequest
 * @return CreateDownloadUrlResponse
 */
async function createDownloadUrl(request: CreateDownloadUrlRequest): CreateDownloadUrlResponse {
  var runtime = new Util.RuntimeOptions{};
  return createDownloadUrlWithOptions(request, runtime);
}

model CreateGlobalQuestionRequest {
  answers?: string(name='Answers', description='This parameter is required.'),
  globalQuestionName?: string(name='GlobalQuestionName', description='This parameter is required.'),
  globalQuestionType?: string(name='GlobalQuestionType', description='This parameter is required.', example='COMMON'),
  instanceId?: string(name='InstanceId', description='This parameter is required.', example='174952ab-9825-4cc9-a5e2-de82d7fa4cdd'),
  questions?: string(name='Questions', description='This parameter is required.'),
  scriptId?: string(name='ScriptId', description='This parameter is required.', example='36fea72b-d6fa-4974-ace7-19ffe3f622fb'),
}

model CreateGlobalQuestionResponseBody = {
  code?: string(name='Code', example='OK'),
  globalQuestionId?: string(name='GlobalQuestionId', example='a546b616-724b-437f-bdb3-629a30c98567'),
  httpStatusCode?: int32(name='HttpStatusCode', example='200'),
  message?: string(name='Message', example='Success'),
  requestId?: string(name='RequestId', example='254EB995-DEDF-48A4-9101-9CA5B72FFBCC'),
  success?: boolean(name='Success', example='true'),
}

model CreateGlobalQuestionResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: CreateGlobalQuestionResponseBody(name='body'),
}

/**
 * @param request CreateGlobalQuestionRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return CreateGlobalQuestionResponse
 */
async function createGlobalQuestionWithOptions(request: CreateGlobalQuestionRequest, runtime: Util.RuntimeOptions): CreateGlobalQuestionResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.answers)) {
    query['Answers'] = request.answers;
  }
  if (!Util.isUnset(request.globalQuestionName)) {
    query['GlobalQuestionName'] = request.globalQuestionName;
  }
  if (!Util.isUnset(request.globalQuestionType)) {
    query['GlobalQuestionType'] = request.globalQuestionType;
  }
  if (!Util.isUnset(request.instanceId)) {
    query['InstanceId'] = request.instanceId;
  }
  if (!Util.isUnset(request.questions)) {
    query['Questions'] = request.questions;
  }
  if (!Util.isUnset(request.scriptId)) {
    query['ScriptId'] = request.scriptId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'CreateGlobalQuestion',
    version = '2019-12-26',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @param request CreateGlobalQuestionRequest
 * @return CreateGlobalQuestionResponse
 */
async function createGlobalQuestion(request: CreateGlobalQuestionRequest): CreateGlobalQuestionResponse {
  var runtime = new Util.RuntimeOptions{};
  return createGlobalQuestionWithOptions(request, runtime);
}

model CreateInstanceRequest {
  callingNumber?: [ string ](name='CallingNumber'),
  instanceDescription?: string(name='InstanceDescription'),
  instanceName?: string(name='InstanceName', description='This parameter is required.'),
  maxConcurrentConversation?: int32(name='MaxConcurrentConversation', description='This parameter is required.', example='4'),
  nluServiceType?: string(name='NluServiceType', example='Provided'),
  resourceGroupId?: string(name='ResourceGroupId', example='rg-acfmwd4qr3z773y'),
}

model CreateInstanceResponseBody = {
  code?: string(name='Code', example='OK'),
  httpStatusCode?: int32(name='HttpStatusCode', example='200'),
  instance?: {
    creationTime?: long(name='CreationTime', example='1578469042851'),
    creatorId?: long(name='CreatorId', example='435986'),
    creatorName?: string(name='CreatorName', example='xxx'),
    instanceDescription?: string(name='InstanceDescription'),
    instanceId?: string(name='InstanceId', example='90515b5-6115-4ccf-83e2-52d5bfaf2ddf'),
    instanceName?: string(name='InstanceName'),
    maxConcurrentConversation?: int32(name='MaxConcurrentConversation', example='4'),
    ownerName?: string(name='OwnerName', example='xxxx'),
    resourceGroupId?: string(name='ResourceGroupId', example='90515b5-6115-4ccf-83e2-52d5bfaf2ddf'),
  }(name='Instance'),
  message?: string(name='Message', example='Success'),
  requestId?: string(name='RequestId', example='254EB995-DEDF-48A4-9101-9CA5B72FFBCC'),
  success?: boolean(name='Success', example='true'),
}

model CreateInstanceResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: CreateInstanceResponseBody(name='body'),
}

/**
 * @param request CreateInstanceRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return CreateInstanceResponse
 */
async function createInstanceWithOptions(request: CreateInstanceRequest, runtime: Util.RuntimeOptions): CreateInstanceResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.callingNumber)) {
    query['CallingNumber'] = request.callingNumber;
  }
  if (!Util.isUnset(request.instanceDescription)) {
    query['InstanceDescription'] = request.instanceDescription;
  }
  if (!Util.isUnset(request.instanceName)) {
    query['InstanceName'] = request.instanceName;
  }
  if (!Util.isUnset(request.maxConcurrentConversation)) {
    query['MaxConcurrentConversation'] = request.maxConcurrentConversation;
  }
  if (!Util.isUnset(request.nluServiceType)) {
    query['NluServiceType'] = request.nluServiceType;
  }
  if (!Util.isUnset(request.resourceGroupId)) {
    query['ResourceGroupId'] = request.resourceGroupId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'CreateInstance',
    version = '2019-12-26',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @param request CreateInstanceRequest
 * @return CreateInstanceResponse
 */
async function createInstance(request: CreateInstanceRequest): CreateInstanceResponse {
  var runtime = new Util.RuntimeOptions{};
  return createInstanceWithOptions(request, runtime);
}

model CreateInstanceBindNumberRequest {
  instanceList?: string(name='InstanceList', example='1,2,4,5'),
  number?: string(name='Number', example='10088'),
}

model CreateInstanceBindNumberResponseBody = {
  code?: string(name='Code', example='OK'),
  data?: {
    list?: [ 
      {
        instanceId?: string(name='InstanceId', example='96b847ad-2683-4794-b7b4-7ef094fb81f6'),
        success?: boolean(name='Success', example='true'),
      }
    ](name='List'),
  }(name='Data'),
  httpStatusCode?: int32(name='HttpStatusCode', example='200'),
  message?: string(name='Message', example='Success'),
  requestId?: string(name='RequestId', example='254EB995-DEDF-48A4-9101-9CA5B72FFBCC'),
  success?: boolean(name='Success', example='true'),
}

model CreateInstanceBindNumberResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: CreateInstanceBindNumberResponseBody(name='body'),
}

/**
 * @summary 创建实例绑定号码
 *
 * @param request CreateInstanceBindNumberRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return CreateInstanceBindNumberResponse
 */
async function createInstanceBindNumberWithOptions(request: CreateInstanceBindNumberRequest, runtime: Util.RuntimeOptions): CreateInstanceBindNumberResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.instanceList)) {
    query['InstanceList'] = request.instanceList;
  }
  if (!Util.isUnset(request.number)) {
    query['Number'] = request.number;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'CreateInstanceBindNumber',
    version = '2019-12-26',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 创建实例绑定号码
 *
 * @param request CreateInstanceBindNumberRequest
 * @return CreateInstanceBindNumberResponse
 */
async function createInstanceBindNumber(request: CreateInstanceBindNumberRequest): CreateInstanceBindNumberResponse {
  var runtime = new Util.RuntimeOptions{};
  return createInstanceBindNumberWithOptions(request, runtime);
}

model CreateIntentRequest {
  instanceId?: string(name='InstanceId', description='This parameter is required.', example='361c8a53-0e29-42f3-8aa7-c7752d010399'),
  intentDescription?: string(name='IntentDescription'),
  intentName?: string(name='IntentName', description='This parameter is required.'),
  keywords?: string(name='Keywords'),
  scriptId?: string(name='ScriptId', description='This parameter is required.', example='b06fad9a-cc74-4ab6-b3a5-8d062adebf2c'),
  utterances?: string(name='Utterances', description='This parameter is required.'),
}

model CreateIntentResponseBody = {
  code?: string(name='Code', example='OK'),
  httpStatusCode?: int32(name='HttpStatusCode', example='200'),
  intentId?: string(name='IntentId', example='390515b5-6115-4ccf-83e2-52d5bfaf2ddf'),
  message?: string(name='Message', example='Success'),
  requestId?: string(name='RequestId', example='254EB995-DEDF-48A4-9101-9CA5B72FFBCC'),
  success?: boolean(name='Success', example='true'),
}

model CreateIntentResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: CreateIntentResponseBody(name='body'),
}

/**
 * @param request CreateIntentRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return CreateIntentResponse
 */
async function createIntentWithOptions(request: CreateIntentRequest, runtime: Util.RuntimeOptions): CreateIntentResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.instanceId)) {
    query['InstanceId'] = request.instanceId;
  }
  if (!Util.isUnset(request.intentDescription)) {
    query['IntentDescription'] = request.intentDescription;
  }
  if (!Util.isUnset(request.intentName)) {
    query['IntentName'] = request.intentName;
  }
  if (!Util.isUnset(request.keywords)) {
    query['Keywords'] = request.keywords;
  }
  if (!Util.isUnset(request.scriptId)) {
    query['ScriptId'] = request.scriptId;
  }
  if (!Util.isUnset(request.utterances)) {
    query['Utterances'] = request.utterances;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'CreateIntent',
    version = '2019-12-26',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @param request CreateIntentRequest
 * @return CreateIntentResponse
 */
async function createIntent(request: CreateIntentRequest): CreateIntentResponse {
  var runtime = new Util.RuntimeOptions{};
  return createIntentWithOptions(request, runtime);
}

model CreateJobDataParsingTaskRequest {
  instanceId?: string(name='InstanceId', description='This parameter is required.', example='b3865dc3-40fa-4afd-9fe4-dc7cda305a24'),
  jobFilePath?: string(name='JobFilePath', description='This parameter is required.'),
}

model CreateJobDataParsingTaskResponseBody = {
  code?: string(name='Code', example='OK'),
  httpStatusCode?: int32(name='HttpStatusCode', example='200'),
  jobDataParsingTaskId?: string(name='JobDataParsingTaskId', example='d004cfd2-6a81-491c-83c6-cbe186620c95'),
  message?: string(name='Message', example='Success'),
  requestId?: string(name='RequestId', example='254EB995-DEDF-48A4-9101-9CA5B72FFBCC'),
  success?: boolean(name='Success', example='true'),
}

model CreateJobDataParsingTaskResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: CreateJobDataParsingTaskResponseBody(name='body'),
}

/**
 * @param request CreateJobDataParsingTaskRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return CreateJobDataParsingTaskResponse
 */
async function createJobDataParsingTaskWithOptions(request: CreateJobDataParsingTaskRequest, runtime: Util.RuntimeOptions): CreateJobDataParsingTaskResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.instanceId)) {
    query['InstanceId'] = request.instanceId;
  }
  if (!Util.isUnset(request.jobFilePath)) {
    query['JobFilePath'] = request.jobFilePath;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'CreateJobDataParsingTask',
    version = '2019-12-26',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @param request CreateJobDataParsingTaskRequest
 * @return CreateJobDataParsingTaskResponse
 */
async function createJobDataParsingTask(request: CreateJobDataParsingTaskRequest): CreateJobDataParsingTaskResponse {
  var runtime = new Util.RuntimeOptions{};
  return createJobDataParsingTaskWithOptions(request, runtime);
}

model CreateJobGroupRequest {
  callingNumber?: [ string ](name='CallingNumber'),
  flashSmsExtras?: string(name='FlashSmsExtras'),
  instanceId?: string(name='InstanceId', description='This parameter is required.', example='174952ab-9825-4cc9-a5e2-de82d7fa4cdd'),
  jobGroupDescription?: string(name='JobGroupDescription'),
  jobGroupName?: string(name='JobGroupName', description='This parameter is required.'),
  minConcurrency?: long(name='MinConcurrency', example='1'),
  priority?: string(name='Priority'),
  recallCallingNumber?: [ string ](name='RecallCallingNumber'),
  recallStrategyJson?: string(name='RecallStrategyJson', example='{\\\\"emptyNumberIgnore\\\\":true,\\\\"inArrearsIgnore\\\\":true,\\\\"outOfServiceIgnore\\\\":true}'),
  ringingDuration?: long(name='RingingDuration', example='25'),
  scenarioId?: string(name='ScenarioId', example='c6a668d1-3145-4048-9101-cb3678bb8884'),
  scriptId?: string(name='ScriptId', example='b9ff4e88-65f9-4eb3-987c-11ba51f3f24d'),
  strategyJson?: string(name='StrategyJson', example='{\\\\"maxAttemptsPerDay\\\\":1,\\\\"name\\\\":\\\\"fa16dc2e-f778-44ab-8f25-54b7901df82a\\\\",\\\\"startTime\\\\":1640157314127,\\\\"endTime\\\\":1640160914127,\\\\"minAttemptInterval\\\\":10}'),
}

model CreateJobGroupResponseBody = {
  code?: string(name='Code', example='OK'),
  httpStatusCode?: int32(name='HttpStatusCode', example='200'),
  jobGroup?: {
    callingNumbers?: [ string ](name='CallingNumbers'),
    creationTime?: long(name='CreationTime', example='1578550074361'),
    exportProgress?: {
      fileHttpUrl?: string(name='FileHttpUrl', example='https://***.oss-cn-shanghai.aliyuncs.com/sample'),
      progress?: string(name='Progress', example='1'),
      status?: string(name='Status', example='FINISHED'),
    }(name='ExportProgress'),
    jobDataParsingTaskId?: string(name='JobDataParsingTaskId', example='744ff448-2b4c-40d4-94ca-51f246905b0f'),
    jobFilePath?: string(name='JobFilePath', example='UPLOADED/JOB/b3865dc3-40fa-4afd-9fe4-dc7cda305a24/229eac13-379d-4abe-96e0-8cf026b56c0b_template (1).xlsx'),
    jobGroupDescription?: string(name='JobGroupDescription'),
    jobGroupId?: string(name='JobGroupId', example='c62e6789-28a8-41db-941e-171a01d3b3b9'),
    jobGroupName?: string(name='JobGroupName'),
    minConcurrency?: long(name='MinConcurrency', example='1'),
    modifyTime?: string(name='ModifyTime', example='1628425608429'),
    priority?: string(name='Priority'),
    recallCallingNumbers?: [ string ](name='RecallCallingNumbers'),
    recallStrategy?: {
      emptyNumberIgnore?: boolean(name='EmptyNumberIgnore'),
      inArrearsIgnore?: boolean(name='InArrearsIgnore'),
      outOfServiceIgnore?: boolean(name='OutOfServiceIgnore'),
    }(name='RecallStrategy'),
    ringingDuration?: long(name='RingingDuration', example='30'),
    scenarioId?: string(name='ScenarioId', example='6cea9bed-63e6-439e-ae4c-b3333efff53d'),
    scriptName?: string(name='ScriptName'),
    scriptVersion?: string(name='ScriptVersion', example='1628425608429'),
    status?: string(name='Status', example='Scheduling'),
    strategy?: {
      customized?: string(name='Customized', example='{}'),
      endTime?: long(name='EndTime', example='2209702074000'),
      followUpStrategy?: string(name='FollowUpStrategy', example='CONTINUE'),
      isTemplate?: boolean(name='IsTemplate', example='false'),
      maxAttemptsPerDay?: int32(name='MaxAttemptsPerDay', example='3'),
      minAttemptInterval?: int32(name='MinAttemptInterval', example='3'),
      repeatBy?: string(name='RepeatBy', example='Once'),
      repeatDays?: [ string ](name='RepeatDays'),
      routingStrategy?: string(name='RoutingStrategy', example='LocalFirst'),
      startTime?: long(name='StartTime', example='1578550074000'),
      strategyDescription?: string(name='StrategyDescription'),
      strategyId?: string(name='StrategyId', example='cc9a436e-03b0-4ada-8364-77ec2290aa39'),
      strategyName?: string(name='StrategyName'),
      type?: string(name='Type', example='Repeatable'),
      workingTime?: [ 
        {
          beginTime?: string(name='BeginTime', example='09:00:00'),
          endTime?: string(name='EndTime', example='12:00:00'),
        }
      ](name='WorkingTime'),
    }(name='Strategy'),
  }(name='JobGroup'),
  message?: string(name='Message', example='Success'),
  requestId?: string(name='RequestId', example='254EB995-DEDF-48A4-9101-9CA5B72FFBCC'),
  success?: boolean(name='Success', example='true'),
}

model CreateJobGroupResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: CreateJobGroupResponseBody(name='body'),
}

/**
 * @param request CreateJobGroupRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return CreateJobGroupResponse
 */
async function createJobGroupWithOptions(request: CreateJobGroupRequest, runtime: Util.RuntimeOptions): CreateJobGroupResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.callingNumber)) {
    query['CallingNumber'] = request.callingNumber;
  }
  if (!Util.isUnset(request.flashSmsExtras)) {
    query['FlashSmsExtras'] = request.flashSmsExtras;
  }
  if (!Util.isUnset(request.instanceId)) {
    query['InstanceId'] = request.instanceId;
  }
  if (!Util.isUnset(request.jobGroupDescription)) {
    query['JobGroupDescription'] = request.jobGroupDescription;
  }
  if (!Util.isUnset(request.jobGroupName)) {
    query['JobGroupName'] = request.jobGroupName;
  }
  if (!Util.isUnset(request.minConcurrency)) {
    query['MinConcurrency'] = request.minConcurrency;
  }
  if (!Util.isUnset(request.priority)) {
    query['Priority'] = request.priority;
  }
  if (!Util.isUnset(request.recallCallingNumber)) {
    query['RecallCallingNumber'] = request.recallCallingNumber;
  }
  if (!Util.isUnset(request.recallStrategyJson)) {
    query['RecallStrategyJson'] = request.recallStrategyJson;
  }
  if (!Util.isUnset(request.ringingDuration)) {
    query['RingingDuration'] = request.ringingDuration;
  }
  if (!Util.isUnset(request.scenarioId)) {
    query['ScenarioId'] = request.scenarioId;
  }
  if (!Util.isUnset(request.scriptId)) {
    query['ScriptId'] = request.scriptId;
  }
  if (!Util.isUnset(request.strategyJson)) {
    query['StrategyJson'] = request.strategyJson;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'CreateJobGroup',
    version = '2019-12-26',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @param request CreateJobGroupRequest
 * @return CreateJobGroupResponse
 */
async function createJobGroup(request: CreateJobGroupRequest): CreateJobGroupResponse {
  var runtime = new Util.RuntimeOptions{};
  return createJobGroupWithOptions(request, runtime);
}

model CreateJobGroupExportTaskRequest {
  instanceId?: string(name='InstanceId', description='This parameter is required.', example='a4274627-265f-4e14-b2d6-4ee7d4f8593e'),
  jobGroupId?: string(name='JobGroupId', example='baf6dfdc-eb79-4c63-ab19-c56388b1fbdd'),
  option?: [ string ](name='Option', example='[]'),
}

model CreateJobGroupExportTaskResponseBody = {
  code?: string(name='Code', example='OK'),
  httpStatusCode?: int32(name='HttpStatusCode', example='200'),
  message?: string(name='Message', example='Success'),
  requestId?: string(name='RequestId', example='254EB995-DEDF-48A4-9101-9CA5B72FFBCC'),
  success?: boolean(name='Success', example='true'),
  taskId?: string(name='TaskId', example='744b27f3-437f-4a8c-a181-f668e492fd24'),
}

model CreateJobGroupExportTaskResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: CreateJobGroupExportTaskResponseBody(name='body'),
}

/**
 * @param request CreateJobGroupExportTaskRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return CreateJobGroupExportTaskResponse
 */
async function createJobGroupExportTaskWithOptions(request: CreateJobGroupExportTaskRequest, runtime: Util.RuntimeOptions): CreateJobGroupExportTaskResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.instanceId)) {
    query['InstanceId'] = request.instanceId;
  }
  if (!Util.isUnset(request.jobGroupId)) {
    query['JobGroupId'] = request.jobGroupId;
  }
  if (!Util.isUnset(request.option)) {
    query['Option'] = request.option;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'CreateJobGroupExportTask',
    version = '2019-12-26',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @param request CreateJobGroupExportTaskRequest
 * @return CreateJobGroupExportTaskResponse
 */
async function createJobGroupExportTask(request: CreateJobGroupExportTaskRequest): CreateJobGroupExportTaskResponse {
  var runtime = new Util.RuntimeOptions{};
  return createJobGroupExportTaskWithOptions(request, runtime);
}

model CreateNumberDistrictInfoDownloadUrlRequest {
  versionId?: string(name='VersionId', example='KZpaNWMgXEfneopGBMGN9fH35b62NJjN'),
}

model CreateNumberDistrictInfoDownloadUrlResponseBody = {
  code?: string(name='Code', example='OK'),
  fileHttpUrl?: string(name='FileHttpUrl', example='http://www.xxx.com/xxx'),
  httpStatusCode?: int32(name='HttpStatusCode', example='200'),
  message?: string(name='Message', example='Success'),
  requestId?: string(name='RequestId', example='1364f208-982d-4d0c-89aa-d56e22b47589'),
  success?: boolean(name='Success', example='true'),
}

model CreateNumberDistrictInfoDownloadUrlResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: CreateNumberDistrictInfoDownloadUrlResponseBody(name='body'),
}

/**
 * @summary 创建号码库下载链接
 *
 * @param request CreateNumberDistrictInfoDownloadUrlRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return CreateNumberDistrictInfoDownloadUrlResponse
 */
async function createNumberDistrictInfoDownloadUrlWithOptions(request: CreateNumberDistrictInfoDownloadUrlRequest, runtime: Util.RuntimeOptions): CreateNumberDistrictInfoDownloadUrlResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.versionId)) {
    query['VersionId'] = request.versionId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'CreateNumberDistrictInfoDownloadUrl',
    version = '2019-12-26',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 创建号码库下载链接
 *
 * @param request CreateNumberDistrictInfoDownloadUrlRequest
 * @return CreateNumberDistrictInfoDownloadUrlResponse
 */
async function createNumberDistrictInfoDownloadUrl(request: CreateNumberDistrictInfoDownloadUrlRequest): CreateNumberDistrictInfoDownloadUrlResponse {
  var runtime = new Util.RuntimeOptions{};
  return createNumberDistrictInfoDownloadUrlWithOptions(request, runtime);
}

model CreateNumberDistrictInfoParsingTaskRequest {
  filePath?: string(name='FilePath'),
  fileSize?: long(name='FileSize', example='190464'),
}

model CreateNumberDistrictInfoParsingTaskResponseBody = {
  code?: string(name='Code', example='OK'),
  httpStatusCode?: int32(name='HttpStatusCode', example='200'),
  message?: string(name='Message', example='The operation is not allowed. User state (DIALING) does not meet expectations (READY).'),
  requestId?: string(name='RequestId', example='254EB995-DEDF-48A4-9101-9CA5B72FFBCC'),
  success?: boolean(name='Success', example='true'),
}

model CreateNumberDistrictInfoParsingTaskResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: CreateNumberDistrictInfoParsingTaskResponseBody(name='body'),
}

/**
 * @summary 创建号码库解析任务
 *
 * @param request CreateNumberDistrictInfoParsingTaskRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return CreateNumberDistrictInfoParsingTaskResponse
 */
async function createNumberDistrictInfoParsingTaskWithOptions(request: CreateNumberDistrictInfoParsingTaskRequest, runtime: Util.RuntimeOptions): CreateNumberDistrictInfoParsingTaskResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.filePath)) {
    query['FilePath'] = request.filePath;
  }
  if (!Util.isUnset(request.fileSize)) {
    query['FileSize'] = request.fileSize;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'CreateNumberDistrictInfoParsingTask',
    version = '2019-12-26',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 创建号码库解析任务
 *
 * @param request CreateNumberDistrictInfoParsingTaskRequest
 * @return CreateNumberDistrictInfoParsingTaskResponse
 */
async function createNumberDistrictInfoParsingTask(request: CreateNumberDistrictInfoParsingTaskRequest): CreateNumberDistrictInfoParsingTaskResponse {
  var runtime = new Util.RuntimeOptions{};
  return createNumberDistrictInfoParsingTaskWithOptions(request, runtime);
}

model CreateOutboundCallNumberRequest {
  instanceId?: string(name='InstanceId', description='This parameter is required.', example='174952ab-9825-4cc9-a5e2-de82d7fa4cdd'),
  number?: string(name='Number', description='This parameter is required.', example='95187'),
  rateLimitCount?: int32(name='RateLimitCount', description='This parameter is required.', example='20'),
  rateLimitPeriod?: int32(name='RateLimitPeriod', description='This parameter is required.', example='120'),
}

model CreateOutboundCallNumberResponseBody = {
  code?: string(name='Code', example='OK'),
  httpStatusCode?: int32(name='HttpStatusCode', example='200'),
  message?: string(name='Message', example='Success'),
  outboundCallNumberId?: string(name='OutboundCallNumberId', example='390515b5-6115-4ccf-83e2-52d5bfaf2ddf'),
  requestId?: string(name='RequestId', example='254EB995-DEDF-48A4-9101-9CA5B72FFBCC'),
  success?: boolean(name='Success', example='true'),
}

model CreateOutboundCallNumberResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: CreateOutboundCallNumberResponseBody(name='body'),
}

/**
 * @summary CreateOutboundCallNumber
 *
 * @param request CreateOutboundCallNumberRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return CreateOutboundCallNumberResponse
 */
async function createOutboundCallNumberWithOptions(request: CreateOutboundCallNumberRequest, runtime: Util.RuntimeOptions): CreateOutboundCallNumberResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.instanceId)) {
    query['InstanceId'] = request.instanceId;
  }
  if (!Util.isUnset(request.number)) {
    query['Number'] = request.number;
  }
  if (!Util.isUnset(request.rateLimitCount)) {
    query['RateLimitCount'] = request.rateLimitCount;
  }
  if (!Util.isUnset(request.rateLimitPeriod)) {
    query['RateLimitPeriod'] = request.rateLimitPeriod;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'CreateOutboundCallNumber',
    version = '2019-12-26',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary CreateOutboundCallNumber
 *
 * @param request CreateOutboundCallNumberRequest
 * @return CreateOutboundCallNumberResponse
 */
async function createOutboundCallNumber(request: CreateOutboundCallNumberRequest): CreateOutboundCallNumberResponse {
  var runtime = new Util.RuntimeOptions{};
  return createOutboundCallNumberWithOptions(request, runtime);
}

model CreateScriptRequest {
  agentId?: long(name='AgentId'),
  agentKey?: string(name='AgentKey'),
  agentLlm?: boolean(name='AgentLlm'),
  asrConfig?: string(name='AsrConfig', example='{\\\\"appKey\\\\":\\\\"kknxKIhTTUcpCzYX\\\\",\\\\"maxEndSilence\\\\":\\\\"400\\\\",\\\\"silenceTimeout\\\\":\\\\"5\\\\"}'),
  chatbotId?: string(name='ChatbotId', example='chatbot-cn-IfaUfqaUnb'),
  emotionEnable?: boolean(name='EmotionEnable', example='true'),
  industry?: string(name='Industry', description='This parameter is required.'),
  instanceId?: string(name='InstanceId', description='This parameter is required.', example='c46001bc-3ead-4bfd-9a69-4b5b66a4a3f4'),
  longWaitEnable?: boolean(name='LongWaitEnable', example='true'),
  miniPlaybackEnable?: boolean(name='MiniPlaybackEnable', example='true'),
  newBargeInEnable?: boolean(name='NewBargeInEnable', example='true'),
  nluAccessType?: string(name='NluAccessType'),
  nluEngine?: string(name='NluEngine'),
  scene?: string(name='Scene', description='This parameter is required.'),
  scriptContent?: [ string ](name='ScriptContent', example='[]'),
  scriptDescription?: string(name='ScriptDescription'),
  scriptName?: string(name='ScriptName', description='This parameter is required.'),
  scriptNluProfileJsonString?: string(name='ScriptNluProfileJsonString'),
  scriptWaveform?: [ string ](name='ScriptWaveform', example='[]'),
  ttsConfig?: string(name='TtsConfig', example='{\\\\"voice\\\\":\\\\"aixia\\\\",\\\\"volume\\\\":\\\\"50\\\\",\\\\"speechRate\\\\":\\\\"-150\\\\",\\\\"pitchRate\\\\":\\\\"0\\\\"}'),
}

model CreateScriptResponseBody = {
  code?: string(name='Code', example='OK'),
  httpStatusCode?: int32(name='HttpStatusCode', example='200'),
  message?: string(name='Message', example='Success'),
  requestId?: string(name='RequestId', example='254EB995-DEDF-48A4-9101-9CA5B72FFBCC'),
  script?: {
    debugStatus?: string(name='DebugStatus', example='DRAFTED'),
    industry?: string(name='Industry'),
    isDebugDrafted?: boolean(name='IsDebugDrafted', example='true'),
    isDrafted?: boolean(name='IsDrafted', example='true'),
    nluAccessType?: string(name='NluAccessType'),
    nluEngine?: string(name='NluEngine'),
    scene?: string(name='Scene'),
    scriptDescription?: string(name='ScriptDescription'),
    scriptId?: string(name='ScriptId', example='8c58d3e0-bf27-4685-a5a5-65872ec5abc4'),
    scriptName?: string(name='ScriptName'),
    status?: string(name='Status', example='DRAFTED'),
    updateTime?: long(name='UpdateTime', example='1578474045152'),
  }(name='Script'),
  success?: boolean(name='Success', example='true'),
}

model CreateScriptResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: CreateScriptResponseBody(name='body'),
}

/**
 * @summary 新建场景
 *
 * @param request CreateScriptRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return CreateScriptResponse
 */
async function createScriptWithOptions(request: CreateScriptRequest, runtime: Util.RuntimeOptions): CreateScriptResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.agentId)) {
    query['AgentId'] = request.agentId;
  }
  if (!Util.isUnset(request.agentKey)) {
    query['AgentKey'] = request.agentKey;
  }
  if (!Util.isUnset(request.agentLlm)) {
    query['AgentLlm'] = request.agentLlm;
  }
  if (!Util.isUnset(request.asrConfig)) {
    query['AsrConfig'] = request.asrConfig;
  }
  if (!Util.isUnset(request.chatbotId)) {
    query['ChatbotId'] = request.chatbotId;
  }
  if (!Util.isUnset(request.emotionEnable)) {
    query['EmotionEnable'] = request.emotionEnable;
  }
  if (!Util.isUnset(request.industry)) {
    query['Industry'] = request.industry;
  }
  if (!Util.isUnset(request.instanceId)) {
    query['InstanceId'] = request.instanceId;
  }
  if (!Util.isUnset(request.longWaitEnable)) {
    query['LongWaitEnable'] = request.longWaitEnable;
  }
  if (!Util.isUnset(request.miniPlaybackEnable)) {
    query['MiniPlaybackEnable'] = request.miniPlaybackEnable;
  }
  if (!Util.isUnset(request.newBargeInEnable)) {
    query['NewBargeInEnable'] = request.newBargeInEnable;
  }
  if (!Util.isUnset(request.nluAccessType)) {
    query['NluAccessType'] = request.nluAccessType;
  }
  if (!Util.isUnset(request.nluEngine)) {
    query['NluEngine'] = request.nluEngine;
  }
  if (!Util.isUnset(request.scene)) {
    query['Scene'] = request.scene;
  }
  if (!Util.isUnset(request.scriptContent)) {
    query['ScriptContent'] = request.scriptContent;
  }
  if (!Util.isUnset(request.scriptDescription)) {
    query['ScriptDescription'] = request.scriptDescription;
  }
  if (!Util.isUnset(request.scriptName)) {
    query['ScriptName'] = request.scriptName;
  }
  if (!Util.isUnset(request.scriptNluProfileJsonString)) {
    query['ScriptNluProfileJsonString'] = request.scriptNluProfileJsonString;
  }
  if (!Util.isUnset(request.scriptWaveform)) {
    query['ScriptWaveform'] = request.scriptWaveform;
  }
  if (!Util.isUnset(request.ttsConfig)) {
    query['TtsConfig'] = request.ttsConfig;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'CreateScript',
    version = '2019-12-26',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 新建场景
 *
 * @param request CreateScriptRequest
 * @return CreateScriptResponse
 */
async function createScript(request: CreateScriptRequest): CreateScriptResponse {
  var runtime = new Util.RuntimeOptions{};
  return createScriptWithOptions(request, runtime);
}

model CreateScriptWaveformRequest {
  fileId?: string(name='FileId', description='This parameter is required.'),
  fileName?: string(name='FileName', description='This parameter is required.'),
  instanceId?: string(name='InstanceId', description='This parameter is required.'),
  scriptContent?: string(name='ScriptContent', description='This parameter is required.'),
  scriptId?: string(name='ScriptId', description='This parameter is required.'),
}

model CreateScriptWaveformResponseBody = {
  code?: string(name='Code'),
  httpStatusCode?: int32(name='HttpStatusCode'),
  message?: string(name='Message'),
  requestId?: string(name='RequestId'),
  scriptWaveformId?: string(name='ScriptWaveformId'),
  success?: boolean(name='Success'),
}

model CreateScriptWaveformResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: CreateScriptWaveformResponseBody(name='body'),
}

/**
 * @param request CreateScriptWaveformRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return CreateScriptWaveformResponse
 */
async function createScriptWaveformWithOptions(request: CreateScriptWaveformRequest, runtime: Util.RuntimeOptions): CreateScriptWaveformResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.fileId)) {
    query['FileId'] = request.fileId;
  }
  if (!Util.isUnset(request.fileName)) {
    query['FileName'] = request.fileName;
  }
  if (!Util.isUnset(request.instanceId)) {
    query['InstanceId'] = request.instanceId;
  }
  if (!Util.isUnset(request.scriptContent)) {
    query['ScriptContent'] = request.scriptContent;
  }
  if (!Util.isUnset(request.scriptId)) {
    query['ScriptId'] = request.scriptId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'CreateScriptWaveform',
    version = '2019-12-26',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @param request CreateScriptWaveformRequest
 * @return CreateScriptWaveformResponse
 */
async function createScriptWaveform(request: CreateScriptWaveformRequest): CreateScriptWaveformResponse {
  var runtime = new Util.RuntimeOptions{};
  return createScriptWaveformWithOptions(request, runtime);
}

model CreateTagRequest {
  instanceId?: string(name='InstanceId', description='This parameter is required.', example='174952ab-9825-4cc9-a5e2-de82d7fa4cdd'),
  scriptId?: string(name='ScriptId', description='This parameter is required.', example='797203ac-3874-422f-838f-d4cd63c72681'),
  tagGroup?: string(name='TagGroup', description='This parameter is required.'),
  tagName?: string(name='TagName', description='This parameter is required.'),
}

model CreateTagResponseBody = {
  code?: string(name='Code', example='OK'),
  httpStatusCode?: int32(name='HttpStatusCode', example='200'),
  message?: string(name='Message', example='Success'),
  requestId?: string(name='RequestId', example='Success'),
  success?: boolean(name='Success', example='true'),
  tagId?: string(name='TagId', example='390515b5-6115-4ccf-83e2-52d5bfaf2ddf'),
}

model CreateTagResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: CreateTagResponseBody(name='body'),
}

/**
 * @param request CreateTagRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return CreateTagResponse
 */
async function createTagWithOptions(request: CreateTagRequest, runtime: Util.RuntimeOptions): CreateTagResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.instanceId)) {
    query['InstanceId'] = request.instanceId;
  }
  if (!Util.isUnset(request.scriptId)) {
    query['ScriptId'] = request.scriptId;
  }
  if (!Util.isUnset(request.tagGroup)) {
    query['TagGroup'] = request.tagGroup;
  }
  if (!Util.isUnset(request.tagName)) {
    query['TagName'] = request.tagName;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'CreateTag',
    version = '2019-12-26',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @param request CreateTagRequest
 * @return CreateTagResponse
 */
async function createTag(request: CreateTagRequest): CreateTagResponse {
  var runtime = new Util.RuntimeOptions{};
  return createTagWithOptions(request, runtime);
}

model CreateTaskExportTaskRequest {
  actualTimeGte?: long(name='ActualTimeGte', example='1646496000000'),
  actualTimeLte?: long(name='ActualTimeLte', example='1646582400000'),
  callDurationGte?: long(name='CallDurationGte', example='10'),
  callDurationLte?: long(name='CallDurationLte', example='20'),
  calledNumber?: string(name='CalledNumber', example='11111111111'),
  hasAnswered?: boolean(name='HasAnswered', example='true'),
  hasHangUpByRejection?: boolean(name='HasHangUpByRejection', example='true'),
  hasReachedEndOfFlow?: boolean(name='HasReachedEndOfFlow', example='true'),
  instanceId?: string(name='InstanceId', description='This parameter is required.', example='1dcb09c5-d5db-4397-bf65-db854463beea'),
  jobGroupId?: string(name='JobGroupId', example='cb731aee-0a5b-4c2b-924c-d9e82eb1d8d7'),
  jobGroupNameQuery?: string(name='JobGroupNameQuery'),
  jobId?: string(name='JobId', example='82097dd5-54df-475f-beba-eec8f4b7a3e1'),
  jobStatusStringList?: string(name='JobStatusStringList', example='Succeeded'),
  otherId?: string(name='OtherId', example='64ebe700-91b4-49cb-b457-0b7c0b598a86'),
  pageIndex?: int32(name='PageIndex', example='0'),
  pageSize?: int32(name='PageSize', example='10'),
  recordingDurationGte?: long(name='RecordingDurationGte', example='10'),
  recordingDurationLte?: long(name='RecordingDurationLte', example='20'),
  scriptNameQuery?: string(name='ScriptNameQuery'),
  sortBy?: string(name='SortBy', example='actualTime'),
  sortOrder?: string(name='SortOrder', example='desc'),
  taskCreateTimeGte?: long(name='TaskCreateTimeGte', example='1646496000000'),
  taskCreateTimeLte?: long(name='TaskCreateTimeLte', example='1646582400000'),
  taskId?: string(name='TaskId', example='64ebe700-91b4-49cb-b457-0b7c0b598a86'),
  taskStatusStringList?: string(name='TaskStatusStringList', example='Succeeded,Failed'),
  userIdMatch?: string(name='UserIdMatch', example='82097dd5-54df-475f-beba-eec8f4b7a3e1'),
}

model CreateTaskExportTaskResponseBody = {
  code?: string(name='Code', example='OK'),
  httpStatusCode?: int32(name='HttpStatusCode', example='200'),
  message?: string(name='Message', example='[]'),
  requestId?: string(name='RequestId', example='C377C5FF-4F94-1B23-89D0-50C560623EE4'),
  success?: boolean(name='Success', example='true'),
  taskId?: string(name='TaskId', example='a7d6dcff1b8b40f4a8b769a9c24e7852'),
}

model CreateTaskExportTaskResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: CreateTaskExportTaskResponseBody(name='body'),
}

/**
 * @summary 外呼历史导出
 *
 * @param request CreateTaskExportTaskRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return CreateTaskExportTaskResponse
 */
async function createTaskExportTaskWithOptions(request: CreateTaskExportTaskRequest, runtime: Util.RuntimeOptions): CreateTaskExportTaskResponse {
  Util.validateModel(request);
  var query = OpenApiUtil.query(Util.toMap(request));
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'CreateTaskExportTask',
    version = '2019-12-26',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'GET',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 外呼历史导出
 *
 * @param request CreateTaskExportTaskRequest
 * @return CreateTaskExportTaskResponse
 */
async function createTaskExportTask(request: CreateTaskExportTaskRequest): CreateTaskExportTaskResponse {
  var runtime = new Util.RuntimeOptions{};
  return createTaskExportTaskWithOptions(request, runtime);
}

model DeleteAgentProfilesRequest {
  agentProfileIds?: [ string ](name='AgentProfileIds'),
  appIp?: string(name='AppIp', example='127.0.0.1'),
}

model DeleteAgentProfilesShrinkRequest {
  agentProfileIdsShrink?: string(name='AgentProfileIds'),
  appIp?: string(name='AppIp', example='127.0.0.1'),
}

model DeleteAgentProfilesResponseBody = {
  code?: string(name='Code', example='OK'),
  data?: string(name='Data', example='{}'),
  httpStatusCode?: int32(name='HttpStatusCode', example='200'),
  message?: string(name='Message', example='Success'),
  requestId?: string(name='RequestId', example='254EB995-DEDF-48A4-9101-9CA5B72FFBCC'),
  success?: boolean(name='Success', example='true'),
}

model DeleteAgentProfilesResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DeleteAgentProfilesResponseBody(name='body'),
}

/**
 * @param tmpReq DeleteAgentProfilesRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return DeleteAgentProfilesResponse
 */
async function deleteAgentProfilesWithOptions(tmpReq: DeleteAgentProfilesRequest, runtime: Util.RuntimeOptions): DeleteAgentProfilesResponse {
  Util.validateModel(tmpReq);
  var request = new DeleteAgentProfilesShrinkRequest{};
  OpenApiUtil.convert(tmpReq, request);
  if (!Util.isUnset(tmpReq.agentProfileIds)) {
    request.agentProfileIdsShrink = OpenApiUtil.arrayToStringWithSpecifiedStyle(tmpReq.agentProfileIds, 'AgentProfileIds', 'json');
  }
  var body : map[string]any = {};
  if (!Util.isUnset(request.agentProfileIdsShrink)) {
    body['AgentProfileIds'] = request.agentProfileIdsShrink;
  }
  if (!Util.isUnset(request.appIp)) {
    body['AppIp'] = request.appIp;
  }
  var req = new OpenApi.OpenApiRequest{ 
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'DeleteAgentProfiles',
    version = '2019-12-26',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @param request DeleteAgentProfilesRequest
 * @return DeleteAgentProfilesResponse
 */
async function deleteAgentProfiles(request: DeleteAgentProfilesRequest): DeleteAgentProfilesResponse {
  var runtime = new Util.RuntimeOptions{};
  return deleteAgentProfilesWithOptions(request, runtime);
}

model DeleteAllNumberDistrictInfoResponseBody = {
  code?: string(name='Code', example='OK'),
  httpStatusCode?: int32(name='HttpStatusCode', example='200'),
  message?: string(name='Message', example='Success'),
  requestId?: string(name='RequestId', example='254EB995-DEDF-48A4-9101-9CA5B72FFBCC'),
  success?: boolean(name='Success', example='true'),
}

model DeleteAllNumberDistrictInfoResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DeleteAllNumberDistrictInfoResponseBody(name='body'),
}

/**
 * @summary 清空归属地号码库
 *
 * @param request DeleteAllNumberDistrictInfoRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return DeleteAllNumberDistrictInfoResponse
 */
async function deleteAllNumberDistrictInfoWithOptions(runtime: Util.RuntimeOptions): DeleteAllNumberDistrictInfoResponse {
  var req = new OpenApi.OpenApiRequest{};
  var params = new OpenApi.Params{
    action = 'DeleteAllNumberDistrictInfo',
    version = '2019-12-26',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 清空归属地号码库
 *
 * @return DeleteAllNumberDistrictInfoResponse
 */
async function deleteAllNumberDistrictInfo(): DeleteAllNumberDistrictInfoResponse {
  var runtime = new Util.RuntimeOptions{};
  return deleteAllNumberDistrictInfoWithOptions(runtime);
}

model DeleteBeebotIntentRequest {
  instanceId?: string(name='InstanceId', description='This parameter is required.', example='e5035654-1745-484a-8c5b-165f7c7bcd79'),
  intentId?: long(name='IntentId', description='This parameter is required.', example='10717802'),
  scriptId?: string(name='ScriptId', description='This parameter is required.', example='c5c5d8c0-c0f1-48a7-be2b-dc46006d888a'),
}

model DeleteBeebotIntentResponseBody = {
  beebotRequestId?: string(name='BeebotRequestId', example='497CFAFF-48CC-161A-AD2C-252DED569037'),
  code?: string(name='Code', example='OK'),
  httpStatusCode?: int32(name='HttpStatusCode', example='200'),
  intentId?: long(name='IntentId', example='10717802'),
  message?: string(name='Message', example='Success'),
  requestId?: string(name='RequestId', example='254EB995-DEDF-48A4-9101-9CA5B72FFBCC'),
  success?: boolean(name='Success', example='true'),
}

model DeleteBeebotIntentResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DeleteBeebotIntentResponseBody(name='body'),
}

/**
 * @summary DeleteBeebotIntent
 *
 * @param request DeleteBeebotIntentRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return DeleteBeebotIntentResponse
 */
async function deleteBeebotIntentWithOptions(request: DeleteBeebotIntentRequest, runtime: Util.RuntimeOptions): DeleteBeebotIntentResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.instanceId)) {
    query['InstanceId'] = request.instanceId;
  }
  if (!Util.isUnset(request.intentId)) {
    query['IntentId'] = request.intentId;
  }
  if (!Util.isUnset(request.scriptId)) {
    query['ScriptId'] = request.scriptId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'DeleteBeebotIntent',
    version = '2019-12-26',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary DeleteBeebotIntent
 *
 * @param request DeleteBeebotIntentRequest
 * @return DeleteBeebotIntentResponse
 */
async function deleteBeebotIntent(request: DeleteBeebotIntentRequest): DeleteBeebotIntentResponse {
  var runtime = new Util.RuntimeOptions{};
  return deleteBeebotIntentWithOptions(request, runtime);
}

model DeleteBeebotIntentLgfRequest {
  instanceId?: string(name='InstanceId', description='This parameter is required.', example='e5035654-1745-484a-8c5b-165f7c7bcd79'),
  intentId?: long(name='IntentId', description='This parameter is required.', example='10717802'),
  lgfId?: long(name='LgfId', description='This parameter is required.', example='5666117'),
  scriptId?: string(name='ScriptId', description='This parameter is required.', example='c5c5d8c0-c0f1-48a7-be2b-dc46006d888a'),
}

model DeleteBeebotIntentLgfResponseBody = {
  beebotRequestId?: string(name='BeebotRequestId', example='0B219FCB-EC71-1F08-BB1B-0E87C20158C8'),
  code?: string(name='Code', example='OK'),
  httpStatusCode?: int32(name='HttpStatusCode', example='200'),
  lgfId?: long(name='LgfId', example='5666117'),
  message?: string(name='Message', example='Success'),
  requestId?: string(name='RequestId', example='254EB995-DEDF-48A4-9101-9CA5B72FFBCC'),
  success?: boolean(name='Success', example='true'),
}

model DeleteBeebotIntentLgfResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DeleteBeebotIntentLgfResponseBody(name='body'),
}

/**
 * @summary DeleteBeebotIntentLgf
 *
 * @param request DeleteBeebotIntentLgfRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return DeleteBeebotIntentLgfResponse
 */
async function deleteBeebotIntentLgfWithOptions(request: DeleteBeebotIntentLgfRequest, runtime: Util.RuntimeOptions): DeleteBeebotIntentLgfResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.instanceId)) {
    query['InstanceId'] = request.instanceId;
  }
  if (!Util.isUnset(request.intentId)) {
    query['IntentId'] = request.intentId;
  }
  if (!Util.isUnset(request.lgfId)) {
    query['LgfId'] = request.lgfId;
  }
  if (!Util.isUnset(request.scriptId)) {
    query['ScriptId'] = request.scriptId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'DeleteBeebotIntentLgf',
    version = '2019-12-26',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary DeleteBeebotIntentLgf
 *
 * @param request DeleteBeebotIntentLgfRequest
 * @return DeleteBeebotIntentLgfResponse
 */
async function deleteBeebotIntentLgf(request: DeleteBeebotIntentLgfRequest): DeleteBeebotIntentLgfResponse {
  var runtime = new Util.RuntimeOptions{};
  return deleteBeebotIntentLgfWithOptions(request, runtime);
}

model DeleteBeebotIntentUserSayRequest {
  instanceId?: string(name='InstanceId', description='This parameter is required.', example='e5035654-1745-484a-8c5b-165f7c7bcd79'),
  intentId?: string(name='IntentId', description='This parameter is required.', example='10717802'),
  scriptId?: string(name='ScriptId', description='This parameter is required.', example='c5c5d8c0-c0f1-48a7-be2b-dc46006d888a'),
  userSayId?: string(name='UserSayId', description='This parameter is required.', example='17448458'),
}

model DeleteBeebotIntentUserSayResponseBody = {
  beebotRequestId?: string(name='BeebotRequestId', example='0B219FCB-EC71-1F08-BB1B-0E87C20158C8'),
  code?: string(name='Code', example='OK'),
  httpStatusCode?: int32(name='HttpStatusCode', example='200'),
  message?: string(name='Message', example='Success'),
  requestId?: string(name='RequestId', example='254EB995-DEDF-48A4-9101-9CA5B72FFBCC'),
  success?: boolean(name='Success', example='true'),
  userSayId?: long(name='UserSayId', example='17448458'),
}

model DeleteBeebotIntentUserSayResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DeleteBeebotIntentUserSayResponseBody(name='body'),
}

/**
 * @summary DeleteBeebotIntentUserSay
 *
 * @param request DeleteBeebotIntentUserSayRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return DeleteBeebotIntentUserSayResponse
 */
async function deleteBeebotIntentUserSayWithOptions(request: DeleteBeebotIntentUserSayRequest, runtime: Util.RuntimeOptions): DeleteBeebotIntentUserSayResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.instanceId)) {
    query['InstanceId'] = request.instanceId;
  }
  if (!Util.isUnset(request.intentId)) {
    query['IntentId'] = request.intentId;
  }
  if (!Util.isUnset(request.scriptId)) {
    query['ScriptId'] = request.scriptId;
  }
  if (!Util.isUnset(request.userSayId)) {
    query['UserSayId'] = request.userSayId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'DeleteBeebotIntentUserSay',
    version = '2019-12-26',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary DeleteBeebotIntentUserSay
 *
 * @param request DeleteBeebotIntentUserSayRequest
 * @return DeleteBeebotIntentUserSayResponse
 */
async function deleteBeebotIntentUserSay(request: DeleteBeebotIntentUserSayRequest): DeleteBeebotIntentUserSayResponse {
  var runtime = new Util.RuntimeOptions{};
  return deleteBeebotIntentUserSayWithOptions(request, runtime);
}

model DeleteContactBlockListRequest {
  contactBlockListId?: string(name='ContactBlockListId', description='This parameter is required.', example='c6320d3c-fa45-4011-b3b1-acdfabe3a8c6'),
  instanceId?: string(name='InstanceId', description='This parameter is required.', example='c6320d3c-fa45-4011-b3b1-acdfabe3a8c6'),
  operator?: string(name='Operator', example='160131'),
}

model DeleteContactBlockListResponseBody = {
  affectedRows?: int32(name='AffectedRows', example='5'),
  code?: string(name='Code', example='OK'),
  httpStatusCode?: int32(name='HttpStatusCode', example='200'),
  message?: string(name='Message', example='Success'),
  requestId?: string(name='RequestId', example='254EB995-DEDF-48A4-9101-9CA5B72FFBCC'),
  success?: boolean(name='Success', example='true'),
}

model DeleteContactBlockListResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DeleteContactBlockListResponseBody(name='body'),
}

/**
 * @param request DeleteContactBlockListRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return DeleteContactBlockListResponse
 */
async function deleteContactBlockListWithOptions(request: DeleteContactBlockListRequest, runtime: Util.RuntimeOptions): DeleteContactBlockListResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.contactBlockListId)) {
    query['ContactBlockListId'] = request.contactBlockListId;
  }
  if (!Util.isUnset(request.instanceId)) {
    query['InstanceId'] = request.instanceId;
  }
  if (!Util.isUnset(request.operator)) {
    query['Operator'] = request.operator;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'DeleteContactBlockList',
    version = '2019-12-26',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @param request DeleteContactBlockListRequest
 * @return DeleteContactBlockListResponse
 */
async function deleteContactBlockList(request: DeleteContactBlockListRequest): DeleteContactBlockListResponse {
  var runtime = new Util.RuntimeOptions{};
  return deleteContactBlockListWithOptions(request, runtime);
}

model DeleteContactWhiteListRequest {
  contactWhiteListId?: string(name='ContactWhiteListId', description='This parameter is required.', example='111111'),
  instanceId?: string(name='InstanceId', description='This parameter is required.', example='af81a389-91f0-4157-8d82-720edd02b66a'),
  operator?: string(name='Operator', example='160131'),
}

model DeleteContactWhiteListResponseBody = {
  affectedRows?: int32(name='AffectedRows', example='5'),
  code?: string(name='Code', example='OK'),
  httpStatusCode?: int32(name='HttpStatusCode', example='200'),
  message?: string(name='Message', example='Success'),
  requestId?: string(name='RequestId', example='254EB995-DEDF-48A4-9101-9CA5B72FFBCC'),
  success?: boolean(name='Success', example='true'),
}

model DeleteContactWhiteListResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DeleteContactWhiteListResponseBody(name='body'),
}

/**
 * @param request DeleteContactWhiteListRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return DeleteContactWhiteListResponse
 */
async function deleteContactWhiteListWithOptions(request: DeleteContactWhiteListRequest, runtime: Util.RuntimeOptions): DeleteContactWhiteListResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.contactWhiteListId)) {
    query['ContactWhiteListId'] = request.contactWhiteListId;
  }
  if (!Util.isUnset(request.instanceId)) {
    query['InstanceId'] = request.instanceId;
  }
  if (!Util.isUnset(request.operator)) {
    query['Operator'] = request.operator;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'DeleteContactWhiteList',
    version = '2019-12-26',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @param request DeleteContactWhiteListRequest
 * @return DeleteContactWhiteListResponse
 */
async function deleteContactWhiteList(request: DeleteContactWhiteListRequest): DeleteContactWhiteListResponse {
  var runtime = new Util.RuntimeOptions{};
  return deleteContactWhiteListWithOptions(request, runtime);
}

model DeleteDialogueFlowRequest {
  dialogueFlowId?: string(name='DialogueFlowId', description='This parameter is required.', example='40a1457a-d2f3-43cf-ac81-c9e14cf07d88'),
  instanceId?: string(name='InstanceId', description='This parameter is required.', example='361c8a53-0e29-42f3-8aa7-c7752d010399'),
  scriptId?: string(name='ScriptId', description='This parameter is required.', example='d7c28efb-47f7-4a85-a522-5038e30a0b98'),
}

model DeleteDialogueFlowResponseBody = {
  code?: string(name='Code', example='OK'),
  httpStatusCode?: int32(name='HttpStatusCode', example='200'),
  message?: string(name='Message', example='Success'),
  requestId?: string(name='RequestId', example='254EB995-DEDF-48A4-9101-9CA5B72FFBCC'),
  success?: boolean(name='Success', example='true'),
}

model DeleteDialogueFlowResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DeleteDialogueFlowResponseBody(name='body'),
}

/**
 * @param request DeleteDialogueFlowRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return DeleteDialogueFlowResponse
 */
async function deleteDialogueFlowWithOptions(request: DeleteDialogueFlowRequest, runtime: Util.RuntimeOptions): DeleteDialogueFlowResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.dialogueFlowId)) {
    query['DialogueFlowId'] = request.dialogueFlowId;
  }
  if (!Util.isUnset(request.instanceId)) {
    query['InstanceId'] = request.instanceId;
  }
  if (!Util.isUnset(request.scriptId)) {
    query['ScriptId'] = request.scriptId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'DeleteDialogueFlow',
    version = '2019-12-26',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @param request DeleteDialogueFlowRequest
 * @return DeleteDialogueFlowResponse
 */
async function deleteDialogueFlow(request: DeleteDialogueFlowRequest): DeleteDialogueFlowResponse {
  var runtime = new Util.RuntimeOptions{};
  return deleteDialogueFlowWithOptions(request, runtime);
}

model DeleteGlobalQuestionRequest {
  globalQuestionId?: string(name='GlobalQuestionId', description='This parameter is required.', example='35f1361e-4377-494c-9f10-4274bda0317f'),
  instanceId?: string(name='InstanceId', description='This parameter is required.', example='361c8a53-0e29-42f3-8aa7-c7752d010399'),
  scriptId?: string(name='ScriptId', description='This parameter is required.', example='aa279896-64a6-4182-864c-4f2b04ec8d17'),
}

model DeleteGlobalQuestionResponseBody = {
  code?: string(name='Code', example='OK'),
  httpStatusCode?: int32(name='HttpStatusCode', example='200'),
  message?: string(name='Message', example='Success'),
  requestId?: string(name='RequestId', example='254EB995-DEDF-48A4-9101-9CA5B72FFBCC'),
  success?: boolean(name='Success', example='true'),
}

model DeleteGlobalQuestionResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DeleteGlobalQuestionResponseBody(name='body'),
}

/**
 * @param request DeleteGlobalQuestionRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return DeleteGlobalQuestionResponse
 */
async function deleteGlobalQuestionWithOptions(request: DeleteGlobalQuestionRequest, runtime: Util.RuntimeOptions): DeleteGlobalQuestionResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.globalQuestionId)) {
    query['GlobalQuestionId'] = request.globalQuestionId;
  }
  if (!Util.isUnset(request.instanceId)) {
    query['InstanceId'] = request.instanceId;
  }
  if (!Util.isUnset(request.scriptId)) {
    query['ScriptId'] = request.scriptId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'DeleteGlobalQuestion',
    version = '2019-12-26',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @param request DeleteGlobalQuestionRequest
 * @return DeleteGlobalQuestionResponse
 */
async function deleteGlobalQuestion(request: DeleteGlobalQuestionRequest): DeleteGlobalQuestionResponse {
  var runtime = new Util.RuntimeOptions{};
  return deleteGlobalQuestionWithOptions(request, runtime);
}

model DeleteInstanceRequest {
  instanceId?: string(name='InstanceId', description='This parameter is required.', example='361c8a53-0e29-42f3-8aa7-c7752d010399'),
}

model DeleteInstanceResponseBody = {
  code?: string(name='Code', example='OK'),
  httpStatusCode?: int32(name='HttpStatusCode', example='200'),
  message?: string(name='Message', example='Success'),
  requestId?: string(name='RequestId', example='254EB995-DEDF-48A4-9101-9CA5B72FFBCC'),
  success?: boolean(name='Success', example='true'),
}

model DeleteInstanceResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DeleteInstanceResponseBody(name='body'),
}

/**
 * @param request DeleteInstanceRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return DeleteInstanceResponse
 */
async function deleteInstanceWithOptions(request: DeleteInstanceRequest, runtime: Util.RuntimeOptions): DeleteInstanceResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.instanceId)) {
    query['InstanceId'] = request.instanceId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'DeleteInstance',
    version = '2019-12-26',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @param request DeleteInstanceRequest
 * @return DeleteInstanceResponse
 */
async function deleteInstance(request: DeleteInstanceRequest): DeleteInstanceResponse {
  var runtime = new Util.RuntimeOptions{};
  return deleteInstanceWithOptions(request, runtime);
}

model DeleteIntentRequest {
  instanceId?: string(name='InstanceId', description='This parameter is required.', example='361c8a53-0e29-42f3-8aa7-c7752d010399'),
  intentId?: string(name='IntentId', description='This parameter is required.', example='c21fb0ec-fb5e-476f-a6bf-81a892739c8d'),
  scriptId?: string(name='ScriptId', description='This parameter is required.', example='aa279896-64a6-4182-864c-4f2b04ec8d17'),
}

model DeleteIntentResponseBody = {
  code?: string(name='Code', example='OK'),
  httpStatusCode?: int32(name='HttpStatusCode', example='200'),
  message?: string(name='Message', example='Succes'),
  requestId?: string(name='RequestId', example='254EB995-DEDF-48A4-9101-9CA5B72FFBCC'),
  success?: boolean(name='Success', example='true'),
}

model DeleteIntentResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DeleteIntentResponseBody(name='body'),
}

/**
 * @param request DeleteIntentRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return DeleteIntentResponse
 */
async function deleteIntentWithOptions(request: DeleteIntentRequest, runtime: Util.RuntimeOptions): DeleteIntentResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.instanceId)) {
    query['InstanceId'] = request.instanceId;
  }
  if (!Util.isUnset(request.intentId)) {
    query['IntentId'] = request.intentId;
  }
  if (!Util.isUnset(request.scriptId)) {
    query['ScriptId'] = request.scriptId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'DeleteIntent',
    version = '2019-12-26',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @param request DeleteIntentRequest
 * @return DeleteIntentResponse
 */
async function deleteIntent(request: DeleteIntentRequest): DeleteIntentResponse {
  var runtime = new Util.RuntimeOptions{};
  return deleteIntentWithOptions(request, runtime);
}

model DeleteJobGroupRequest {
  instanceId?: string(name='InstanceId', description='This parameter is required.', example='8fa1953f-4a84-46d8-b80c-8ce9cf684fb3'),
  jobGroupId?: string(name='JobGroupId', description='This parameter is required.', example='fc1fb484-4fe8-4031-b662-5b87ea88590b'),
}

model DeleteJobGroupResponseBody = {
  code?: string(name='Code', example='OK'),
  httpStatusCode?: int32(name='HttpStatusCode', example='200'),
  message?: string(name='Message', example='Success'),
  requestId?: string(name='RequestId', example='254EB995-DEDF-48A4-9101-9CA5B72FFBCC'),
  success?: boolean(name='Success', example='true'),
}

model DeleteJobGroupResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DeleteJobGroupResponseBody(name='body'),
}

/**
 * @param request DeleteJobGroupRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return DeleteJobGroupResponse
 */
async function deleteJobGroupWithOptions(request: DeleteJobGroupRequest, runtime: Util.RuntimeOptions): DeleteJobGroupResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.instanceId)) {
    query['InstanceId'] = request.instanceId;
  }
  if (!Util.isUnset(request.jobGroupId)) {
    query['JobGroupId'] = request.jobGroupId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'DeleteJobGroup',
    version = '2019-12-26',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @param request DeleteJobGroupRequest
 * @return DeleteJobGroupResponse
 */
async function deleteJobGroup(request: DeleteJobGroupRequest): DeleteJobGroupResponse {
  var runtime = new Util.RuntimeOptions{};
  return deleteJobGroupWithOptions(request, runtime);
}

model DeleteOutboundCallNumberRequest {
  instanceId?: string(name='InstanceId', description='This parameter is required.', example='33014787-cc13-49d3-ab2f-a98aa8f15fbb'),
  outboundCallNumberId?: string(name='OutboundCallNumberId', description='This parameter is required.', example='ffa367e0-58f3-43b6-9615-c63db99c5add'),
}

model DeleteOutboundCallNumberResponseBody = {
  code?: string(name='Code', example='OK'),
  httpStatusCode?: int32(name='HttpStatusCode', example='200'),
  message?: string(name='Message', example='Success'),
  requestId?: string(name='RequestId', example='254EB995-DEDF-48A4-9101-9CA5B72FFBCC'),
  success?: boolean(name='Success', example='true'),
}

model DeleteOutboundCallNumberResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DeleteOutboundCallNumberResponseBody(name='body'),
}

/**
 * @param request DeleteOutboundCallNumberRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return DeleteOutboundCallNumberResponse
 */
async function deleteOutboundCallNumberWithOptions(request: DeleteOutboundCallNumberRequest, runtime: Util.RuntimeOptions): DeleteOutboundCallNumberResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.instanceId)) {
    query['InstanceId'] = request.instanceId;
  }
  if (!Util.isUnset(request.outboundCallNumberId)) {
    query['OutboundCallNumberId'] = request.outboundCallNumberId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'DeleteOutboundCallNumber',
    version = '2019-12-26',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @param request DeleteOutboundCallNumberRequest
 * @return DeleteOutboundCallNumberResponse
 */
async function deleteOutboundCallNumber(request: DeleteOutboundCallNumberRequest): DeleteOutboundCallNumberResponse {
  var runtime = new Util.RuntimeOptions{};
  return deleteOutboundCallNumberWithOptions(request, runtime);
}

model DeleteScriptRequest {
  instanceId?: string(name='InstanceId', description='This parameter is required.', example='b3d5ac22-9643-49c6-aa84-777f6656f9f5'),
  scriptId?: string(name='ScriptId', description='This parameter is required.', example='5c589560-6b9d-4415-a3e0-049c4ff05f56'),
}

model DeleteScriptResponseBody = {
  code?: string(name='Code', example='OK'),
  httpStatusCode?: int32(name='HttpStatusCode', example='200'),
  message?: string(name='Message', example='Success'),
  requestId?: string(name='RequestId', example='254EB995-DEDF-48A4-9101-9CA5B72FFBCC'),
  success?: boolean(name='Success', example='true'),
}

model DeleteScriptResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DeleteScriptResponseBody(name='body'),
}

/**
 * @param request DeleteScriptRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return DeleteScriptResponse
 */
async function deleteScriptWithOptions(request: DeleteScriptRequest, runtime: Util.RuntimeOptions): DeleteScriptResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.instanceId)) {
    query['InstanceId'] = request.instanceId;
  }
  if (!Util.isUnset(request.scriptId)) {
    query['ScriptId'] = request.scriptId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'DeleteScript',
    version = '2019-12-26',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @param request DeleteScriptRequest
 * @return DeleteScriptResponse
 */
async function deleteScript(request: DeleteScriptRequest): DeleteScriptResponse {
  var runtime = new Util.RuntimeOptions{};
  return deleteScriptWithOptions(request, runtime);
}

model DeleteScriptRecordingRequest {
  instanceId?: string(name='InstanceId', description='This parameter is required.', example='1eefcb81-cd58-4143-8180-6a962d79d708'),
  scriptId?: string(name='ScriptId', description='This parameter is required.', example='dcc42f0d-cfd8-4866-9bbf-002042503745'),
  uuidsJson?: string(name='UuidsJson', example='[
      "d17d5bfa-4972-4389-9718-f9602edabe48"
]'),
}

model DeleteScriptRecordingResponseBody = {
  code?: string(name='Code', example='OK'),
  httpStatusCode?: int32(name='HttpStatusCode', example='200'),
  message?: string(name='Message', example='Success'),
  requestId?: string(name='RequestId', example='56666881-887A-530A-B679-C3B6B6B142C0'),
  success?: boolean(name='Success', example='true'),
}

model DeleteScriptRecordingResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DeleteScriptRecordingResponseBody(name='body'),
}

/**
 * @param request DeleteScriptRecordingRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return DeleteScriptRecordingResponse
 */
async function deleteScriptRecordingWithOptions(request: DeleteScriptRecordingRequest, runtime: Util.RuntimeOptions): DeleteScriptRecordingResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.instanceId)) {
    query['InstanceId'] = request.instanceId;
  }
  if (!Util.isUnset(request.scriptId)) {
    query['ScriptId'] = request.scriptId;
  }
  if (!Util.isUnset(request.uuidsJson)) {
    query['UuidsJson'] = request.uuidsJson;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'DeleteScriptRecording',
    version = '2019-12-26',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @param request DeleteScriptRecordingRequest
 * @return DeleteScriptRecordingResponse
 */
async function deleteScriptRecording(request: DeleteScriptRecordingRequest): DeleteScriptRecordingResponse {
  var runtime = new Util.RuntimeOptions{};
  return deleteScriptRecordingWithOptions(request, runtime);
}

model DeleteScriptWaveformRequest {
  instanceId?: string(name='InstanceId', description='This parameter is required.'),
  scriptId?: string(name='ScriptId', description='This parameter is required.'),
  scriptWaveformId?: string(name='ScriptWaveformId', description='This parameter is required.'),
}

model DeleteScriptWaveformResponseBody = {
  code?: string(name='Code'),
  httpStatusCode?: int32(name='HttpStatusCode'),
  message?: string(name='Message'),
  requestId?: string(name='RequestId'),
  success?: boolean(name='Success'),
}

model DeleteScriptWaveformResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DeleteScriptWaveformResponseBody(name='body'),
}

/**
 * @param request DeleteScriptWaveformRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return DeleteScriptWaveformResponse
 */
async function deleteScriptWaveformWithOptions(request: DeleteScriptWaveformRequest, runtime: Util.RuntimeOptions): DeleteScriptWaveformResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.instanceId)) {
    query['InstanceId'] = request.instanceId;
  }
  if (!Util.isUnset(request.scriptId)) {
    query['ScriptId'] = request.scriptId;
  }
  if (!Util.isUnset(request.scriptWaveformId)) {
    query['ScriptWaveformId'] = request.scriptWaveformId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'DeleteScriptWaveform',
    version = '2019-12-26',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @param request DeleteScriptWaveformRequest
 * @return DeleteScriptWaveformResponse
 */
async function deleteScriptWaveform(request: DeleteScriptWaveformRequest): DeleteScriptWaveformResponse {
  var runtime = new Util.RuntimeOptions{};
  return deleteScriptWaveformWithOptions(request, runtime);
}

model DescribeBeebotIntentRequest {
  instanceId?: string(name='InstanceId', description='This parameter is required.', example='e5035654-1745-484a-8c5b-165f7c7bcd79'),
  intentId?: long(name='IntentId', description='This parameter is required.', example='10717802'),
  scriptId?: string(name='ScriptId', description='This parameter is required.', example='c5c5d8c0-c0f1-48a7-be2b-dc46006d888a'),
}

model DescribeBeebotIntentResponseBody = {
  beebotRequestId?: string(name='BeebotRequestId', example='0B219FCB-EC71-1F08-BB1B-0E87C20158C8'),
  code?: string(name='Code', example='OK'),
  httpStatusCode?: int32(name='HttpStatusCode', example='200'),
  intent?: {
    aliasName?: string(name='AliasName'),
    createTime?: string(name='CreateTime', example='2025-04-21 10:29:59.+0800'),
    createUserId?: string(name='CreateUserId', example='1252504'),
    createUserName?: string(name='CreateUserName', example='xxx@voice-navigator-testonaliyun.com'),
    intentId?: long(name='IntentId', example='10717802'),
    intentName?: string(name='IntentName'),
    modifyTime?: string(name='ModifyTime', example='2025-04-21 15:52:57.+0800'),
    modifyUserId?: string(name='ModifyUserId', example='1252504'),
    modifyUserName?: string(name='ModifyUserName', example='xxx@voice-navigator-testonaliyun.com'),
  }(name='Intent'),
  intentId?: long(name='IntentId', example='10717802'),
  message?: string(name='Message', example='Success'),
  requestId?: string(name='RequestId', example='254EB995-DEDF-48A4-9101-9CA5B72FFBCC'),
  success?: boolean(name='Success', example='true'),
}

model DescribeBeebotIntentResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DescribeBeebotIntentResponseBody(name='body'),
}

/**
 * @summary DescribeBeebotIntent
 *
 * @description ****
 *
 * @param request DescribeBeebotIntentRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return DescribeBeebotIntentResponse
 */
async function describeBeebotIntentWithOptions(request: DescribeBeebotIntentRequest, runtime: Util.RuntimeOptions): DescribeBeebotIntentResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.instanceId)) {
    query['InstanceId'] = request.instanceId;
  }
  if (!Util.isUnset(request.intentId)) {
    query['IntentId'] = request.intentId;
  }
  if (!Util.isUnset(request.scriptId)) {
    query['ScriptId'] = request.scriptId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'DescribeBeebotIntent',
    version = '2019-12-26',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary DescribeBeebotIntent
 *
 * @description ****
 *
 * @param request DescribeBeebotIntentRequest
 * @return DescribeBeebotIntentResponse
 */
async function describeBeebotIntent(request: DescribeBeebotIntentRequest): DescribeBeebotIntentResponse {
  var runtime = new Util.RuntimeOptions{};
  return describeBeebotIntentWithOptions(request, runtime);
}

model DescribeDialogueNodeStatisticsRequest {
  instanceId?: string(name='InstanceId', description='This parameter is required.', example='aeff669b-388f-4619-82af-81e177df5628'),
  jobGroupId?: string(name='JobGroupId', description='This parameter is required.', example='a3c670d1-01bf-491d-b9aa-759b1a82f47c'),
  limit?: int32(name='Limit', description='This parameter is required.', example='30'),
}

model DescribeDialogueNodeStatisticsResponseBody = {
  code?: string(name='Code', example='OK'),
  groupId?: string(name='GroupId', example='f06f7c9f-2895-4b30-a8c2-6ecccb9c9f89'),
  hangUpDialogueNodes?: [ 
    {
      hangUpNum?: int32(name='HangUpNum'),
      nodeId?: string(name='NodeId'),
      nodeName?: string(name='NodeName'),
      rateDisplay?: string(name='RateDisplay'),
    }
  ](name='HangUpDialogueNodes'),
  httpStatusCode?: int32(name='HttpStatusCode', example='200'),
  instanceId?: string(name='InstanceId', example='e5035654-1745-484a-8c5b-165f7c7bcd79'),
  message?: string(name='Message', example='Success'),
  noAnswerDialogueNodes?: [ 
    {
      groupId?: string(name='GroupId', example='f06f7c9f-2895-4b30-a8c2-6ecccb9c9f89'),
      hangUpNum?: int32(name='HangUpNum', example='2'),
      hitNum?: int32(name='HitNum', example='12'),
      id?: string(name='Id', description='id', example='123'),
      instanceId?: string(name='InstanceId', example='e5035654-1745-484a-8c5b-165f7c7bcd79'),
      noAnswerNum?: int32(name='NoAnswerNum', example='2'),
      nodeId?: string(name='NodeId', example='e5035654-1745-484a-8c5b-165f7c7bcd79'),
      nodeName?: string(name='NodeName', example='xxx'),
    }
  ](name='NoAnswerDialogueNodes', example='[]'),
  requestId?: string(name='RequestId', example='254EB995-DEDF-48A4-9101-9CA5B72FFBCC'),
  success?: boolean(name='Success', example='true'),
  totalCompleted?: int32(name='TotalCompleted', example='13'),
}

model DescribeDialogueNodeStatisticsResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DescribeDialogueNodeStatisticsResponseBody(name='body'),
}

/**
 * @param request DescribeDialogueNodeStatisticsRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return DescribeDialogueNodeStatisticsResponse
 */
async function describeDialogueNodeStatisticsWithOptions(request: DescribeDialogueNodeStatisticsRequest, runtime: Util.RuntimeOptions): DescribeDialogueNodeStatisticsResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.instanceId)) {
    query['InstanceId'] = request.instanceId;
  }
  if (!Util.isUnset(request.jobGroupId)) {
    query['JobGroupId'] = request.jobGroupId;
  }
  if (!Util.isUnset(request.limit)) {
    query['Limit'] = request.limit;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'DescribeDialogueNodeStatistics',
    version = '2019-12-26',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @param request DescribeDialogueNodeStatisticsRequest
 * @return DescribeDialogueNodeStatisticsResponse
 */
async function describeDialogueNodeStatistics(request: DescribeDialogueNodeStatisticsRequest): DescribeDialogueNodeStatisticsResponse {
  var runtime = new Util.RuntimeOptions{};
  return describeDialogueNodeStatisticsWithOptions(request, runtime);
}

model DescribeDsReportsRequest {
  instanceId?: string(name='InstanceId', description='This parameter is required.', example='a4274627-265f-4e14-b2d6-4ee7d4f8593e'),
  jobGroupId?: string(name='JobGroupId', description='This parameter is required.', example='9eb8fe4f-b286-4834-9688-2c9b171e223e'),
}

model DescribeDsReportsResponseBody = {
  code?: string(name='Code', example='OK'),
  dsReports?: string(name='DsReports', example='{}'),
  httpStatusCode?: int32(name='HttpStatusCode', example='200'),
  message?: string(name='Message', example='Success'),
  requestId?: string(name='RequestId', example='1364f208-982d-4d0c-89aa-d56e22b47589'),
  success?: boolean(name='Success', example='true'),
}

model DescribeDsReportsResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DescribeDsReportsResponseBody(name='body'),
}

/**
 * @summary DescribeDsReports
 *
 * @param request DescribeDsReportsRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return DescribeDsReportsResponse
 */
async function describeDsReportsWithOptions(request: DescribeDsReportsRequest, runtime: Util.RuntimeOptions): DescribeDsReportsResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.instanceId)) {
    query['InstanceId'] = request.instanceId;
  }
  if (!Util.isUnset(request.jobGroupId)) {
    query['JobGroupId'] = request.jobGroupId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'DescribeDsReports',
    version = '2019-12-26',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary DescribeDsReports
 *
 * @param request DescribeDsReportsRequest
 * @return DescribeDsReportsResponse
 */
async function describeDsReports(request: DescribeDsReportsRequest): DescribeDsReportsResponse {
  var runtime = new Util.RuntimeOptions{};
  return describeDsReportsWithOptions(request, runtime);
}

model DescribeGlobalQuestionRequest {
  globalQuestionId?: string(name='GlobalQuestionId', description='This parameter is required.', example='e851e242-ad67-4507-96a2-d4114564dcec'),
  instanceId?: string(name='InstanceId', description='This parameter is required.', example='7cefbff0-8d50-4d6f-b93c-73cee23c1555'),
  scriptId?: string(name='ScriptId', description='This parameter is required.', example='b7ee988b-2837-4bc1-9d56-f76e7c831f60'),
}

model DescribeGlobalQuestionResponseBody = {
  code?: string(name='Code', example='OK'),
  globalQuestion?: {
    answers?: string(name='Answers'),
    globalQuestionId?: string(name='GlobalQuestionId', example='f160ec2e-94f2-4c03-87be-ece5b52d5dd9'),
    globalQuestionName?: string(name='GlobalQuestionName'),
    globalQuestionType?: string(name='GlobalQuestionType', example='COMMON'),
    questions?: string(name='Questions'),
    scriptId?: string(name='ScriptId', example='290e06a5-6de2-4cc8-8a9c-72b7c152256c'),
  }(name='GlobalQuestion'),
  httpStatusCode?: int32(name='HttpStatusCode', example='200'),
  message?: string(name='Message', example='Success'),
  requestId?: string(name='RequestId', example='254EB995-DEDF-48A4-9101-9CA5B72FFBCC'),
  success?: boolean(name='Success', example='true'),
}

model DescribeGlobalQuestionResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DescribeGlobalQuestionResponseBody(name='body'),
}

/**
 * @param request DescribeGlobalQuestionRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return DescribeGlobalQuestionResponse
 */
async function describeGlobalQuestionWithOptions(request: DescribeGlobalQuestionRequest, runtime: Util.RuntimeOptions): DescribeGlobalQuestionResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.globalQuestionId)) {
    query['GlobalQuestionId'] = request.globalQuestionId;
  }
  if (!Util.isUnset(request.instanceId)) {
    query['InstanceId'] = request.instanceId;
  }
  if (!Util.isUnset(request.scriptId)) {
    query['ScriptId'] = request.scriptId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'DescribeGlobalQuestion',
    version = '2019-12-26',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @param request DescribeGlobalQuestionRequest
 * @return DescribeGlobalQuestionResponse
 */
async function describeGlobalQuestion(request: DescribeGlobalQuestionRequest): DescribeGlobalQuestionResponse {
  var runtime = new Util.RuntimeOptions{};
  return describeGlobalQuestionWithOptions(request, runtime);
}

model DescribeGroupExecutingInfoRequest {
  instanceId?: string(name='InstanceId', description='This parameter is required.', example='c46001bc-3ead-4bfd-9a69-4b5b66a4a3f4'),
  jobGroupId?: string(name='JobGroupId', description='This parameter is required.', example='3640dda7-e5b1-4b3e-9ccf-da4fc5402e11'),
}

model DescribeGroupExecutingInfoResponseBody = {
  code?: string(name='Code', example='OK'),
  executingInfo?: {
    callFailedNum?: int32(name='CallFailedNum', example='5'),
    callNum?: int32(name='CallNum', example='5'),
    creatorName?: string(name='CreatorName', example='xxx'),
    endTime?: long(name='EndTime', example='1640087774563'),
    finishedNum?: int32(name='FinishedNum', example='5'),
    hangUpByClientNum?: int32(name='HangUpByClientNum', example='5'),
    jobsProgress?: {
      cancelledNum?: int32(name='CancelledNum', example='5'),
      executingNum?: int32(name='ExecutingNum', example='5'),
      failedNum?: int32(name='FailedNum', example='5'),
      pausedNum?: int32(name='PausedNum', example='5'),
      schedulingNum?: int32(name='SchedulingNum', example='5'),
      totalCompletedNum?: int32(name='TotalCompletedNum', example='5'),
      totalJobs?: int32(name='TotalJobs', example='5'),
      totalNotAnsweredNum?: int32(name='TotalNotAnsweredNum', example='5'),
    }(name='JobsProgress', example='{}'),
    noInteractionNum?: int32(name='NoInteractionNum'),
    startTime?: long(name='StartTime', example='1640087774563'),
    transferByIntentNum?: int32(name='TransferByIntentNum', example='5'),
    transferByNoAnswer?: int32(name='TransferByNoAnswer', example='5'),
  }(name='ExecutingInfo', example='{}'),
  groupId?: string(name='GroupId', example='b24d321a-2a74-4dd1-a0ba-4ab09cef6652'),
  httpStatusCode?: int32(name='HttpStatusCode', example='200'),
  instanceId?: string(name='InstanceId', example='c46001bc-3ead-4bfd-9a69-4b5b66a4a3f4'),
  message?: string(name='Message', example='Success'),
  requestId?: string(name='RequestId', example='254EB995-DEDF-48A4-9101-9CA5B72FFBCC'),
  success?: boolean(name='Success', example='true'),
}

model DescribeGroupExecutingInfoResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DescribeGroupExecutingInfoResponseBody(name='body'),
}

/**
 * @param request DescribeGroupExecutingInfoRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return DescribeGroupExecutingInfoResponse
 */
async function describeGroupExecutingInfoWithOptions(request: DescribeGroupExecutingInfoRequest, runtime: Util.RuntimeOptions): DescribeGroupExecutingInfoResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.instanceId)) {
    query['InstanceId'] = request.instanceId;
  }
  if (!Util.isUnset(request.jobGroupId)) {
    query['JobGroupId'] = request.jobGroupId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'DescribeGroupExecutingInfo',
    version = '2019-12-26',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @param request DescribeGroupExecutingInfoRequest
 * @return DescribeGroupExecutingInfoResponse
 */
async function describeGroupExecutingInfo(request: DescribeGroupExecutingInfoRequest): DescribeGroupExecutingInfoResponse {
  var runtime = new Util.RuntimeOptions{};
  return describeGroupExecutingInfoWithOptions(request, runtime);
}

model DescribeInstanceRequest {
  instanceId?: string(name='InstanceId', description='This parameter is required.', example='af81a389-91f0-4157-8d82-720edd02b66a'),
}

model DescribeInstanceResponseBody = {
  code?: string(name='Code', example='OK'),
  httpStatusCode?: int32(name='HttpStatusCode', example='200'),
  instance?: {
    creationTime?: long(name='CreationTime', example='1578469042851'),
    creatorId?: long(name='CreatorId', example='435986'),
    creatorName?: string(name='CreatorName', example='xxx'),
    instanceDescription?: string(name='InstanceDescription'),
    instanceId?: string(name='InstanceId', example='90515b5-6115-4ccf-83e2-52d5bfaf2ddf'),
    instanceName?: string(name='InstanceName'),
    maxConcurrentConversation?: int32(name='MaxConcurrentConversation', example='4'),
    ownerName?: string(name='OwnerName', example='xxxx'),
    resourceGroupId?: string(name='ResourceGroupId', example='90515b5-6115-4ccf-83e2-52d5bfaf2ddf'),
  }(name='Instance'),
  message?: string(name='Message', example='Success'),
  requestId?: string(name='RequestId', example='254EB995-DEDF-48A4-9101-9CA5B72FFBCC'),
  success?: boolean(name='Success', example='true'),
}

model DescribeInstanceResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DescribeInstanceResponseBody(name='body'),
}

/**
 * @summary DescribeInstance
 *
 * @param request DescribeInstanceRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return DescribeInstanceResponse
 */
async function describeInstanceWithOptions(request: DescribeInstanceRequest, runtime: Util.RuntimeOptions): DescribeInstanceResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.instanceId)) {
    query['InstanceId'] = request.instanceId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'DescribeInstance',
    version = '2019-12-26',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary DescribeInstance
 *
 * @param request DescribeInstanceRequest
 * @return DescribeInstanceResponse
 */
async function describeInstance(request: DescribeInstanceRequest): DescribeInstanceResponse {
  var runtime = new Util.RuntimeOptions{};
  return describeInstanceWithOptions(request, runtime);
}

model DescribeIntentRequest {
  instanceId?: string(name='InstanceId', description='This parameter is required.', example='af81a389-91f0-4157-8d82-720edd02b66a'),
  intentId?: string(name='IntentId', description='This parameter is required.', example='0f8a0059-dc9c-4151-8378-4734bbadf3cc'),
  scriptId?: string(name='ScriptId', description='This parameter is required.', example='b9ff4e88-65f9-4eb3-987c-11ba51f3f24d'),
}

model DescribeIntentResponseBody = {
  code?: string(name='Code', example='OK'),
  httpStatusCode?: int32(name='HttpStatusCode', example='200'),
  intent?: {
    createTime?: long(name='CreateTime', example='1578469042851'),
    intentDescription?: string(name='IntentDescription'),
    intentId?: string(name='IntentId', example='a8494b35-eefb-4c8a-887b-b60d2f0fa57a'),
    intentName?: string(name='IntentName'),
    keywords?: string(name='Keywords'),
    scriptId?: string(name='ScriptId', example='6ef95fd5-558f-4ee8-af34-b2ede087a87c'),
    updateTime?: long(name='UpdateTime', example='1578469042851'),
    utterances?: string(name='Utterances'),
  }(name='Intent'),
  message?: string(name='Message', example='Success'),
  requestId?: string(name='RequestId', example='254EB995-DEDF-48A4-9101-9CA5B72FFBCC'),
  success?: boolean(name='Success', example='true'),
}

model DescribeIntentResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DescribeIntentResponseBody(name='body'),
}

/**
 * @param request DescribeIntentRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return DescribeIntentResponse
 */
async function describeIntentWithOptions(request: DescribeIntentRequest, runtime: Util.RuntimeOptions): DescribeIntentResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.instanceId)) {
    query['InstanceId'] = request.instanceId;
  }
  if (!Util.isUnset(request.intentId)) {
    query['IntentId'] = request.intentId;
  }
  if (!Util.isUnset(request.scriptId)) {
    query['ScriptId'] = request.scriptId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'DescribeIntent',
    version = '2019-12-26',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @param request DescribeIntentRequest
 * @return DescribeIntentResponse
 */
async function describeIntent(request: DescribeIntentRequest): DescribeIntentResponse {
  var runtime = new Util.RuntimeOptions{};
  return describeIntentWithOptions(request, runtime);
}

model DescribeIntentStatisticsRequest {
  instanceId?: string(name='InstanceId', description='This parameter is required.', example='c3c92de8-e4bd-4db4-a962-50f8acce40bc'),
  jobGroupId?: string(name='JobGroupId', description='This parameter is required.', example='040355a9-e80c-4308-b85c-aa5b9fd25246'),
  limit?: int32(name='Limit', example='5'),
}

model DescribeIntentStatisticsResponseBody = {
  code?: string(name='Code', example='OK'),
  globalIntentNum?: int32(name='GlobalIntentNum', example='100'),
  globalIntents?: [ 
    {
      groupId?: string(name='GroupId', example='0c3f352f-d045-491d-9ce7-11f2d2b7775d'),
      hitAfterNoAnswer?: int32(name='HitAfterNoAnswer', example='1'),
      hitNum?: int32(name='HitNum', example='11'),
      instanceId?: string(name='InstanceId', example='a4274627-265f-4e14-b2d6-4ee7d4f8593e'),
      intentId?: string(name='IntentId', example='21343425'),
      intentName?: string(name='IntentName'),
      type?: string(name='Type', example='GlobalIntent'),
    }
  ](name='GlobalIntents', example='[]'),
  groupId?: string(name='GroupId', example='0c3f352f-d045-491d-9ce7-11f2d2b7775d'),
  httpStatusCode?: int32(name='HttpStatusCode', example='200'),
  instanceId?: string(name='InstanceId', example='a4274627-265f-4e14-b2d6-4ee7d4f8593e'),
  intentsAfterNoAnswer?: [ 
    {
      groupId?: string(name='GroupId'),
      hitAfterNoAnswer?: int32(name='HitAfterNoAnswer'),
      instanceId?: string(name='InstanceId', example='a4274627-265f-4e14-b2d6-4ee7d4f8593e'),
      intentId?: string(name='IntentId'),
      intentName?: string(name='IntentName'),
    }
  ](name='IntentsAfterNoAnswer'),
  message?: string(name='Message', example='Success'),
  processIntentNum?: int32(name='ProcessIntentNum', example='123'),
  processIntents?: [ 
    {
      groupId?: string(name='GroupId', example='0c3f352f-d045-491d-9ce7-11f2d2b7775d'),
      hitAfterNoAnswer?: int32(name='HitAfterNoAnswer', example='1'),
      hitNum?: int32(name='HitNum', example='10'),
      instanceId?: string(name='InstanceId', example='a4274627-265f-4e14-b2d6-4ee7d4f8593e'),
      intentId?: string(name='IntentId', example='12343'),
      intentName?: string(name='IntentName'),
      rateDisplay?: string(name='RateDisplay'),
      type?: string(name='Type', example='ProcessIntent'),
    }
  ](name='ProcessIntents', example='[]'),
  requestId?: string(name='RequestId', example='254EB995-DEDF-48A4-9101-9CA5B72FFBCC'),
  success?: boolean(name='Success', example='true'),
}

model DescribeIntentStatisticsResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DescribeIntentStatisticsResponseBody(name='body'),
}

/**
 * @param request DescribeIntentStatisticsRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return DescribeIntentStatisticsResponse
 */
async function describeIntentStatisticsWithOptions(request: DescribeIntentStatisticsRequest, runtime: Util.RuntimeOptions): DescribeIntentStatisticsResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.instanceId)) {
    query['InstanceId'] = request.instanceId;
  }
  if (!Util.isUnset(request.jobGroupId)) {
    query['JobGroupId'] = request.jobGroupId;
  }
  if (!Util.isUnset(request.limit)) {
    query['Limit'] = request.limit;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'DescribeIntentStatistics',
    version = '2019-12-26',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @param request DescribeIntentStatisticsRequest
 * @return DescribeIntentStatisticsResponse
 */
async function describeIntentStatistics(request: DescribeIntentStatisticsRequest): DescribeIntentStatisticsResponse {
  var runtime = new Util.RuntimeOptions{};
  return describeIntentStatisticsWithOptions(request, runtime);
}

model DescribeJobRequest {
  instanceId?: string(name='InstanceId', description='This parameter is required.', example='af81a389-91f0-4157-8d82-720edd02b66a'),
  jobId?: string(name='JobId', description='This parameter is required.', example='c8a2b7f2-ad1a-4865-b872-d0080d9802d9'),
  withScript?: boolean(name='WithScript', example='false'),
}

model DescribeJobResponseBody = {
  code?: string(name='Code', example='OK'),
  httpStatusCode?: int32(name='HttpStatusCode', example='200'),
  job?: {
    actualTime?: long(name='ActualTime', example='1640068026385'),
    calledNumber?: string(name='CalledNumber', example='137****7777'),
    callingNumbers?: [ string ](name='CallingNumbers', example='["057126883106"]'),
    contacts?: [ 
      {
        contactId?: string(name='ContactId', example='db3db762-e421-44c9-9a01-cb423470757c'),
        contactName?: string(name='ContactName'),
        honorific?: string(name='Honorific'),
        jobId?: string(name='JobId', example='72dcd26b-f12d-4c27-b3af-18f6aed5b160'),
        phoneNumber?: string(name='PhoneNumber', example='1358****8888'),
        referenceId?: string(name='ReferenceId', example='2fa6bac3-06da-4315-82ab-72d6fd3a6f34'),
        role?: string(name='Role', example='*'),
        state?: string(name='State', example='Available'),
      }
    ](name='Contacts', example='[]'),
    dsReport?: string(name='DsReport', example='-'),
    endReason?: int32(name='EndReason', example='1'),
    extras?: [ 
      {
        key?: string(name='Key', example='djrq'),
        value?: string(name='Value', example='2019-08-21 09:49:59.0'),
      }
    ](name='Extras', example='[]'),
    failureReason?: string(name='FailureReason', example='NoAnswer'),
    instanceId?: string(name='InstanceId', example='d5971d98-7312-4f0e-a918-a17d67133e28'),
    jobGroupId?: string(name='JobGroupId', example='fce6c599-8ede-40e3-9f78-0928eda7b4e8'),
    jobId?: string(name='JobId', example='b72425bd-7871-4050-838e-033d80d754b7'),
    nextExecutionTime?: long(name='NextExecutionTime', example='1640068026385'),
    priority?: int32(name='Priority', example='5'),
    referenceId?: string(name='ReferenceId', example='d5971d98-7312-4f0e-a918-a17d67133e28'),
    scenarioId?: string(name='ScenarioId', example='ade80092-03d9-4f4d-ad4f-ab8a247d3150'),
    script?: {
      asrConfig?: string(name='AsrConfig', example='{\\\\"AppKey\\\\":\\\\"3GHttnsvir1FeWWb\\\\"}'),
      chatbotId?: string(name='ChatbotId', example='chatbot-cn-EJfqqa***'),
      debugStatus?: string(name='DebugStatus', example='DRAFTED'),
      industry?: string(name='Industry'),
      isDebugDrafted?: boolean(name='IsDebugDrafted', example='true'),
      isDrafted?: boolean(name='IsDrafted', example='true'),
      miniPlaybackConfigEnabled?: boolean(name='MiniPlaybackConfigEnabled', example='true'),
      name?: string(name='Name'),
      scene?: string(name='Scene'),
      scriptDescription?: string(name='ScriptDescription'),
      scriptId?: string(name='ScriptId', example='810b5872-57f0-4b27-80ab-7b3f4d8a6374'),
      status?: string(name='Status', example='DRAFTED'),
      ttsConfig?: string(name='TtsConfig', example='{\\\\"voice\\\\":\\\\"xiaobei\\\\",\\\\"volume\\\\":\\\\"50\\\\",\\\\"speechRate\\\\":\\\\"-150\\\\",\\\\"pitchRate\\\\":\\\\"0\\\\"}'),
      updateTime?: long(name='UpdateTime', example='1578881227000'),
    }(name='Script'),
    status?: string(name='Status', example='Succeeded'),
    strategyId?: string(name='StrategyId', example='c8a2b7f2-ad1a-4865-b872-d0080d9802d9'),
    summary?: [ 
      {
        category?: string(name='Category', example='{}'),
        content?: string(name='Content', example='5'),
        summaryName?: string(name='SummaryName', example='score'),
      }
    ](name='Summary', example='[]'),
    systemPriority?: int32(name='SystemPriority', example='1'),
    tasks?: [ 
      {
        actualTime?: long(name='ActualTime', example='1579068424883'),
        brief?: string(name='Brief', example='1'),
        callId?: string(name='CallId', example='1528189846043'),
        calledNumber?: string(name='CalledNumber', example='135****8888'),
        callingNumber?: string(name='CallingNumber', example='0571****3106'),
        chatbotId?: string(name='ChatbotId', example='1234'),
        contact?: {
          contactId?: string(name='ContactId', example='db3db762-e421-44c9-9a01-cb423470757c'),
          contactName?: string(name='ContactName'),
          honorific?: string(name='Honorific'),
          jobId?: string(name='JobId', example='b72425bd-7871-4050-838e-033d80d754b7'),
          phoneNumber?: string(name='PhoneNumber', example='1351****8888'),
          referenceId?: string(name='ReferenceId', example='2fa6bac3-06da-4315-82ab-72d6fd3a6f34'),
          role?: string(name='Role', example='*'),
          state?: string(name='State', example='Available'),
        }(name='Contact', example='{}'),
        conversation?: [ 
          {
            action?: string(name='Action', example='Broadcast'),
            actionParams?: string(name='ActionParams', example='{}'),
            script?: string(name='Script'),
            sequenceId?: string(name='SequenceId', example='fd279983-93b9-b13b-9a34-64e5df473225'),
            speaker?: string(name='Speaker', example='Robot'),
            summary?: [ 
              {
                category?: string(name='Category', example='{}'),
                content?: string(name='Content', example='5'),
                summaryName?: string(name='SummaryName', example='score'),
              }
            ](name='Summary', example='[]'),
            timestamp?: long(name='Timestamp', example='1579068424883'),
          }
        ](name='Conversation', example='[]'),
        duration?: int32(name='Duration', example='120'),
        endReason?: string(name='EndReason', example='FINISHED'),
        endTime?: long(name='EndTime', example='1579068424883'),
        hangUpDirection?: string(name='HangUpDirection', example='client'),
        jobId?: string(name='JobId', example='b72425bd-7871-4050-838e-033d80d754b7'),
        planedTime?: long(name='PlanedTime', example='1579068424883'),
        realRingingDuration?: long(name='RealRingingDuration'),
        ringingDuration?: long(name='RingingDuration', example='25'),
        scenarioId?: string(name='ScenarioId', example='ade80092-03d9-4f4d-ad4f-ab8a247d3150'),
        sipCode?: string(name='SipCode', example='200'),
        sipDuration?: long(name='SipDuration'),
        status?: string(name='Status', example='Succeeded'),
        taskId?: string(name='TaskId', example='ff44709e-39a6-43ba-959b-20fcabe3e496'),
      }
    ](name='Tasks', example='[]'),
  }(name='Job', example='{}'),
  message?: string(name='Message', example='Success'),
  requestId?: string(name='RequestId', example='254EB995-DEDF-48A4-9101-9CA5B72FFBCC'),
  success?: boolean(name='Success', example='true'),
}

model DescribeJobResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DescribeJobResponseBody(name='body'),
}

/**
 * @summary 获取job信息
 *
 * @param request DescribeJobRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return DescribeJobResponse
 */
async function describeJobWithOptions(request: DescribeJobRequest, runtime: Util.RuntimeOptions): DescribeJobResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.instanceId)) {
    query['InstanceId'] = request.instanceId;
  }
  if (!Util.isUnset(request.jobId)) {
    query['JobId'] = request.jobId;
  }
  if (!Util.isUnset(request.withScript)) {
    query['WithScript'] = request.withScript;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'DescribeJob',
    version = '2019-12-26',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 获取job信息
 *
 * @param request DescribeJobRequest
 * @return DescribeJobResponse
 */
async function describeJob(request: DescribeJobRequest): DescribeJobResponse {
  var runtime = new Util.RuntimeOptions{};
  return describeJobWithOptions(request, runtime);
}

model DescribeJobDataParsingTaskProgressRequest {
  instanceId?: string(name='InstanceId', description='This parameter is required.', example='c209abb3-6804-4a75-b2c7-dd55c8c61b6a'),
  jobDataParsingTaskId?: string(name='JobDataParsingTaskId', description='This parameter is required.', example='50d5e164-9365-4261-980e-3d979c2c948c'),
}

model DescribeJobDataParsingTaskProgressResponseBody = {
  code?: string(name='Code', example='OK'),
  httpStatusCode?: int32(name='HttpStatusCode', example='200'),
  message?: string(name='Message', example='Success'),
  progress?: {
    failErrorCode?: string(name='FailErrorCode', example='Permission.JobStatus'),
    failReason?: string(name='FailReason', example='CreateCorpus'),
    feedbackUrl?: string(name='FeedbackUrl'),
    handledJobCount?: int32(name='HandledJobCount', example='2'),
    status?: string(name='Status', example='Pending'),
    totalJobCount?: int32(name='TotalJobCount', example='3'),
  }(name='Progress', example='{}'),
  requestId?: string(name='RequestId', example='254EB995-DEDF-48A4-9101-9CA5B72FFBCC'),
  success?: boolean(name='Success', example='true'),
}

model DescribeJobDataParsingTaskProgressResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DescribeJobDataParsingTaskProgressResponseBody(name='body'),
}

/**
 * @param request DescribeJobDataParsingTaskProgressRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return DescribeJobDataParsingTaskProgressResponse
 */
async function describeJobDataParsingTaskProgressWithOptions(request: DescribeJobDataParsingTaskProgressRequest, runtime: Util.RuntimeOptions): DescribeJobDataParsingTaskProgressResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.instanceId)) {
    query['InstanceId'] = request.instanceId;
  }
  if (!Util.isUnset(request.jobDataParsingTaskId)) {
    query['JobDataParsingTaskId'] = request.jobDataParsingTaskId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'DescribeJobDataParsingTaskProgress',
    version = '2019-12-26',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @param request DescribeJobDataParsingTaskProgressRequest
 * @return DescribeJobDataParsingTaskProgressResponse
 */
async function describeJobDataParsingTaskProgress(request: DescribeJobDataParsingTaskProgressRequest): DescribeJobDataParsingTaskProgressResponse {
  var runtime = new Util.RuntimeOptions{};
  return describeJobDataParsingTaskProgressWithOptions(request, runtime);
}

model DescribeJobGroupRequest {
  briefTypes?: [ string ](name='BriefTypes'),
  instanceId?: string(name='InstanceId', description='This parameter is required.', example='af81a389-91f0-4157-8d82-720edd02b66a'),
  jobGroupId?: string(name='JobGroupId', description='This parameter is required.', example='46a9ad0c-3e11-44da-a9a7-2c21bf5ce185'),
}

model DescribeJobGroupResponseBody = {
  code?: string(name='Code', example='OK'),
  httpStatusCode?: int32(name='HttpStatusCode', example='200'),
  jobGroup?: {
    callingNumbers?: [ string ](name='CallingNumbers'),
    creationTime?: long(name='CreationTime', example='1578881227404'),
    exportProgress?: {
      fileHttpUrl?: string(name='FileHttpUrl', example='https://oss-cn-shanghai.aliyuncs.com/xx.zip'),
      progress?: string(name='Progress', example='1'),
      status?: string(name='Status', example='FINISHED'),
    }(name='ExportProgress'),
    flashSmsExtras?: {
      configId?: string(name='ConfigId'),
      templateId?: string(name='TemplateId'),
    }(name='FlashSmsExtras'),
    jobDataParsingTaskId?: string(name='JobDataParsingTaskId', example='da37319b-6c83-4268-9f19-814aed62e401/a5a9a310-b902-4674-a6e1-29975cbaa312_100.xlsx'),
    jobFilePath?: string(name='JobFilePath', example='da37319b-6c83-4268-9f19-814aed62e401/a5a9a310-b902-4674-a6e1-29975cbaa312_100.xlsx'),
    jobGroupDescription?: string(name='JobGroupDescription'),
    jobGroupId?: string(name='JobGroupId', example='46a9ad0c-3e11-44da-a9a7-2c21bf5ce185'),
    jobGroupName?: string(name='JobGroupName'),
    minConcurrency?: long(name='MinConcurrency', example='1'),
    modifyTime?: string(name='ModifyTime', example='1578881227404'),
    priority?: string(name='Priority', example='1'),
    progress?: {
      briefs?: [ 
        {
          key?: string(name='Key', example='score'),
          value?: string(name='Value', example='5'),
        }
      ](name='Briefs'),
      cancelled?: int32(name='Cancelled', example='0'),
      categories?: [ 
        {
          key?: string(name='Key', example='success'),
          value?: string(name='Value', example='10'),
        }
      ](name='Categories'),
      duration?: int32(name='Duration', example='1000'),
      executing?: int32(name='Executing', example='2'),
      failed?: int32(name='Failed', example='0'),
      paused?: int32(name='Paused', example='0'),
      scheduling?: int32(name='Scheduling', example='5'),
      startTime?: long(name='StartTime', example='1578881227404'),
      status?: string(name='Status', example='Executing'),
      totalCompleted?: int32(name='TotalCompleted', example='2'),
      totalJobs?: int32(name='TotalJobs', example='10'),
      totalNotAnswered?: int32(name='TotalNotAnswered', example='1'),
    }(name='Progress'),
    recallCallingNumbers?: [ string ](name='RecallCallingNumbers'),
    recallStrategy?: {
      emptyNumberIgnore?: boolean(name='EmptyNumberIgnore', example='false'),
      inArrearsIgnore?: boolean(name='InArrearsIgnore', example='false'),
      outOfServiceIgnore?: boolean(name='OutOfServiceIgnore', example='false'),
    }(name='RecallStrategy'),
    result?: {
      clientHangupNum?: int32(name='ClientHangupNum', example='1'),
      finishedNum?: int32(name='FinishedNum', example='1'),
      noInteractNum?: int32(name='NoInteractNum', example='1'),
      timeoutHangupNum?: int32(name='TimeoutHangupNum', example='1'),
      unrecognizedNum?: int32(name='UnrecognizedNum', example='1'),
    }(name='Result'),
    ringingDuration?: long(name='RingingDuration', example='30'),
    scenarioId?: string(name='ScenarioId', example='fce6c599-8ede-40e3-9f78-0928eda7b4e8'),
    scriptId?: string(name='ScriptId', example='49f00b0d-78ac-4d51-91de-a9e8e92b8470'),
    scriptName?: string(name='ScriptName'),
    scriptVersion?: string(name='ScriptVersion', example='49f00b0d-78ac-4d51-91de-a9e8e92b8470'),
    status?: string(name='Status', example='Completed'),
    strategy?: {
      customized?: string(name='Customized', example='{}'),
      endTime?: long(name='EndTime', example='1579881227404'),
      followUpStrategy?: string(name='FollowUpStrategy', example='NONE'),
      isTemplate?: boolean(name='IsTemplate', example='false'),
      maxAttemptsPerDay?: int32(name='MaxAttemptsPerDay', example='2'),
      minAttemptInterval?: int32(name='MinAttemptInterval', example='10'),
      repeatBy?: string(name='RepeatBy', example='Once'),
      repeatDays?: [ string ](name='RepeatDays'),
      repeatable?: boolean(name='Repeatable'),
      routingStrategy?: string(name='RoutingStrategy', example='LocalFirst'),
      startTime?: long(name='StartTime', example='1578881227404'),
      strategyDescription?: string(name='StrategyDescription'),
      strategyId?: string(name='StrategyId', example='a2bff22c-2604-4df2-83d6-5952e2438c5a'),
      strategyName?: string(name='StrategyName'),
      type?: string(name='Type', example='Repeatable'),
      workingTime?: [ 
        {
          beginTime?: string(name='BeginTime', example='09:00:00'),
          endTime?: string(name='EndTime', example='12:00:00'),
        }
      ](name='WorkingTime'),
    }(name='Strategy'),
  }(name='JobGroup'),
  message?: string(name='Message', example='Success'),
  requestId?: string(name='RequestId', example='254EB995-DEDF-48A4-9101-9CA5B72FFBCC'),
  success?: boolean(name='Success', example='true'),
}

model DescribeJobGroupResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DescribeJobGroupResponseBody(name='body'),
}

/**
 * @summary DescribeJobGroup
 *
 * @param request DescribeJobGroupRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return DescribeJobGroupResponse
 */
async function describeJobGroupWithOptions(request: DescribeJobGroupRequest, runtime: Util.RuntimeOptions): DescribeJobGroupResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.briefTypes)) {
    query['BriefTypes'] = request.briefTypes;
  }
  if (!Util.isUnset(request.instanceId)) {
    query['InstanceId'] = request.instanceId;
  }
  if (!Util.isUnset(request.jobGroupId)) {
    query['JobGroupId'] = request.jobGroupId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'DescribeJobGroup',
    version = '2019-12-26',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary DescribeJobGroup
 *
 * @param request DescribeJobGroupRequest
 * @return DescribeJobGroupResponse
 */
async function describeJobGroup(request: DescribeJobGroupRequest): DescribeJobGroupResponse {
  var runtime = new Util.RuntimeOptions{};
  return describeJobGroupWithOptions(request, runtime);
}

model DescribeJobGroupExportTaskProgressRequest {
  instanceId?: string(name='InstanceId', example='b3dbfb82-1ae6-4e73-b717-f494727d2af3'),
  taskId?: string(name='TaskId', example='e4e2a770-b97b-465a-80d8-06dca008c503'),
}

model DescribeJobGroupExportTaskProgressResponseBody = {
  code?: string(name='Code', example='OK'),
  fileHttpUrl?: string(name='FileHttpUrl', example='http://xxx.xx.com/xx'),
  httpStatusCode?: int32(name='HttpStatusCode', example='200'),
  message?: string(name='Message', example='Success'),
  progress?: float(name='Progress', example='45.0'),
  requestId?: string(name='RequestId', example='254EB995-DEDF-48A4-9101-9CA5B72FFBCC'),
  success?: boolean(name='Success', example='true'),
}

model DescribeJobGroupExportTaskProgressResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DescribeJobGroupExportTaskProgressResponseBody(name='body'),
}

/**
 * @param request DescribeJobGroupExportTaskProgressRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return DescribeJobGroupExportTaskProgressResponse
 */
async function describeJobGroupExportTaskProgressWithOptions(request: DescribeJobGroupExportTaskProgressRequest, runtime: Util.RuntimeOptions): DescribeJobGroupExportTaskProgressResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.instanceId)) {
    query['InstanceId'] = request.instanceId;
  }
  if (!Util.isUnset(request.taskId)) {
    query['TaskId'] = request.taskId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'DescribeJobGroupExportTaskProgress',
    version = '2019-12-26',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @param request DescribeJobGroupExportTaskProgressRequest
 * @return DescribeJobGroupExportTaskProgressResponse
 */
async function describeJobGroupExportTaskProgress(request: DescribeJobGroupExportTaskProgressRequest): DescribeJobGroupExportTaskProgressResponse {
  var runtime = new Util.RuntimeOptions{};
  return describeJobGroupExportTaskProgressWithOptions(request, runtime);
}

model DescribeNumberDistrictInfoStatusResponseBody = {
  appliedVersion?: {
    fileName?: string(name='FileName', example='3.mkv'),
    fileSize?: long(name='FileSize', example='93'),
    versionId?: string(name='VersionId', example='402681645884289024'),
  }(name='AppliedVersion'),
  code?: string(name='Code', example='OK'),
  httpStatusCode?: int32(name='HttpStatusCode', example='200'),
  message?: string(name='Message', example='successful.'),
  parsingVersion?: {
    fileName?: string(name='FileName', example='template (3).xlsx'),
    fileSize?: long(name='FileSize', example='659968'),
    parseProgress?: long(name='ParseProgress', example='10'),
    versionId?: string(name='VersionId', example='64615'),
  }(name='ParsingVersion'),
  requestId?: string(name='RequestId', example='66165274-82CC-5E7D-96D7-89143BAEA138'),
  status?: string(name='Status', example='Empty'),
  success?: boolean(name='Success', example='true'),
}

model DescribeNumberDistrictInfoStatusResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DescribeNumberDistrictInfoStatusResponseBody(name='body'),
}

/**
 * @summary 查询号码库状态
 *
 * @param request DescribeNumberDistrictInfoStatusRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return DescribeNumberDistrictInfoStatusResponse
 */
async function describeNumberDistrictInfoStatusWithOptions(runtime: Util.RuntimeOptions): DescribeNumberDistrictInfoStatusResponse {
  var req = new OpenApi.OpenApiRequest{};
  var params = new OpenApi.Params{
    action = 'DescribeNumberDistrictInfoStatus',
    version = '2019-12-26',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 查询号码库状态
 *
 * @return DescribeNumberDistrictInfoStatusResponse
 */
async function describeNumberDistrictInfoStatus(): DescribeNumberDistrictInfoStatusResponse {
  var runtime = new Util.RuntimeOptions{};
  return describeNumberDistrictInfoStatusWithOptions(runtime);
}

model DescribeScriptRequest {
  instanceId?: string(name='InstanceId', description='This parameter is required.', example='38d2e8ed-04e9-4dac-83b5-a8e57642ef13'),
  scriptId?: string(name='ScriptId', description='This parameter is required.', example='bee7e5b1-5d9a-4389-aa7e-bbbee5353a16'),
}

model DescribeScriptResponseBody = {
  code?: string(name='Code', example='OK'),
  httpStatusCode?: int32(name='HttpStatusCode', example='200'),
  message?: string(name='Message', example='Success'),
  nlsConfig?: string(name='NlsConfig', example='none'),
  requestId?: string(name='RequestId', example='254EB995-DEDF-48A4-9101-9CA5B72FFBCC'),
  script?: {
    agentId?: long(name='AgentId'),
    agentKey?: string(name='AgentKey'),
    agentLlm?: boolean(name='AgentLlm'),
    asrConfig?: string(name='AsrConfig', example='{\\\\"AppKey\\\\":\\\\"3GHttnsvir1FeWWb\\\\"}'),
    chatConfig?: string(name='ChatConfig'),
    chatbotId?: string(name='ChatbotId', example='chatbot-cn-EJfqqa***'),
    debugStatus?: string(name='DebugStatus', example='DRAFTED'),
    emotionEnable?: boolean(name='EmotionEnable', example='true'),
    industry?: string(name='Industry'),
    isDebugDrafted?: boolean(name='IsDebugDrafted', example='true'),
    isDrafted?: boolean(name='IsDrafted', example='true'),
    longWaitEnable?: boolean(name='LongWaitEnable', example='true'),
    miniPlaybackEnable?: boolean(name='MiniPlaybackEnable', example='true'),
    newBargeInEnable?: boolean(name='NewBargeInEnable', example='true'),
    nluEngine?: string(name='NluEngine'),
    nluProfile?: {
      fcFunction?: string(name='FcFunction'),
      fcHttpTriggerUrl?: string(name='FcHttpTriggerUrl'),
      fcRegion?: string(name='FcRegion'),
    }(name='NluProfile'),
    scene?: string(name='Scene'),
    scriptDescription?: string(name='ScriptDescription'),
    scriptId?: string(name='ScriptId', example='810b5872-57f0-4b27-80ab-7b3f4d8a6374'),
    scriptName?: string(name='ScriptName'),
    status?: string(name='Status', example='DRAFTED'),
    ttsConfig?: string(name='TtsConfig', example='{\\\\"voice\\\\":\\\\"xiaobei\\\\",\\\\"volume\\\\":\\\\"50\\\\",\\\\"speechRate\\\\":\\\\"-150\\\\",\\\\"pitchRate\\\\":\\\\"0\\\\"}'),
    updateTime?: long(name='UpdateTime', example='1578881227000'),
  }(name='Script', example='{}'),
  success?: boolean(name='Success', example='true'),
}

model DescribeScriptResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DescribeScriptResponseBody(name='body'),
}

/**
 * @summary 获取场景信息
 *
 * @param request DescribeScriptRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return DescribeScriptResponse
 */
async function describeScriptWithOptions(request: DescribeScriptRequest, runtime: Util.RuntimeOptions): DescribeScriptResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.instanceId)) {
    query['InstanceId'] = request.instanceId;
  }
  if (!Util.isUnset(request.scriptId)) {
    query['ScriptId'] = request.scriptId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'DescribeScript',
    version = '2019-12-26',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 获取场景信息
 *
 * @param request DescribeScriptRequest
 * @return DescribeScriptResponse
 */
async function describeScript(request: DescribeScriptRequest): DescribeScriptResponse {
  var runtime = new Util.RuntimeOptions{};
  return describeScriptWithOptions(request, runtime);
}

model DescribeScriptVoiceConfigRequest {
  instanceId?: string(name='InstanceId', description='This parameter is required.', example='8fa1953f-4a84-46d8-b80c-8ce9cf684fb3'),
  scriptId?: string(name='ScriptId', description='This parameter is required.', example='28c4bcaf-5ab1-495e-8966-3206bf9ee733'),
  scriptVoiceConfigId?: string(name='ScriptVoiceConfigId', description='This parameter is required.', example='2a07b634-e15d-445f-bbcb-fc4ea2df7b87'),
}

model DescribeScriptVoiceConfigResponseBody = {
  code?: string(name='Code', example='OK'),
  httpStatusCode?: int32(name='HttpStatusCode', example='200'),
  message?: string(name='Message', example='Success'),
  requestId?: string(name='RequestId', example='254EB995-DEDF-48A4-9101-9CA5B72FFBCC'),
  scriptVoiceConfig?: {
    instanceId?: string(name='InstanceId', example='291cfc6a-8703-4bdd-a99d-9cba32d5288a'),
    scriptContent?: string(name='ScriptContent'),
    scriptId?: string(name='ScriptId', example='947e0875-b5d4-4b33-b18c-7b2cf85bcb4f'),
    scriptVoiceConfigId?: string(name='ScriptVoiceConfigId', example='2a07b634-e15d-445f-bbcb-fc4ea2df7b87'),
    scriptWaveformRelation?: string(name='ScriptWaveformRelation'),
    source?: string(name='Source', example='DIALOGUE_FLOW'),
    type?: string(name='Type', example='WAVEFORM'),
  }(name='ScriptVoiceConfig'),
  success?: boolean(name='Success', example='true'),
}

model DescribeScriptVoiceConfigResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DescribeScriptVoiceConfigResponseBody(name='body'),
}

/**
 * @param request DescribeScriptVoiceConfigRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return DescribeScriptVoiceConfigResponse
 */
async function describeScriptVoiceConfigWithOptions(request: DescribeScriptVoiceConfigRequest, runtime: Util.RuntimeOptions): DescribeScriptVoiceConfigResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.instanceId)) {
    query['InstanceId'] = request.instanceId;
  }
  if (!Util.isUnset(request.scriptId)) {
    query['ScriptId'] = request.scriptId;
  }
  if (!Util.isUnset(request.scriptVoiceConfigId)) {
    query['ScriptVoiceConfigId'] = request.scriptVoiceConfigId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'DescribeScriptVoiceConfig',
    version = '2019-12-26',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @param request DescribeScriptVoiceConfigRequest
 * @return DescribeScriptVoiceConfigResponse
 */
async function describeScriptVoiceConfig(request: DescribeScriptVoiceConfigRequest): DescribeScriptVoiceConfigResponse {
  var runtime = new Util.RuntimeOptions{};
  return describeScriptVoiceConfigWithOptions(request, runtime);
}

model DescribeTTSConfigRequest {
  instanceId?: string(name='InstanceId', description='This parameter is required.', example='0ec0c897-b92c-40e4-9ad7-e6e4f5ce13bb'),
  scriptId?: string(name='ScriptId', description='This parameter is required.', example='d7fbd0a0-27bc-49c4-a456-ecb75e79122b'),
}

model DescribeTTSConfigResponseBody = {
  code?: string(name='Code', example='OK'),
  httpStatusCode?: int32(name='HttpStatusCode', example='200'),
  message?: string(name='Message', example='Success'),
  requestId?: string(name='RequestId', example='f765d3ee-ec03-4765-b235-6877501d99d1'),
  success?: boolean(name='Success', example='true'),
  TTSConfig?: {
    appKey?: string(name='AppKey'),
    instanceId?: string(name='InstanceId', example='947e0875-b5d4-4b33-b18c-7b2cf85bcb4f'),
    nlsServiceType?: string(name='NlsServiceType', example='Managed'),
    speechRate?: string(name='SpeechRate', example='-150'),
    voice?: string(name='Voice', example='xiaoyun'),
    volume?: string(name='Volume', example='100'),
  }(name='TTSConfig'),
}

model DescribeTTSConfigResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DescribeTTSConfigResponseBody(name='body'),
}

/**
 * @param request DescribeTTSConfigRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return DescribeTTSConfigResponse
 */
async function describeTTSConfigWithOptions(request: DescribeTTSConfigRequest, runtime: Util.RuntimeOptions): DescribeTTSConfigResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.instanceId)) {
    query['InstanceId'] = request.instanceId;
  }
  if (!Util.isUnset(request.scriptId)) {
    query['ScriptId'] = request.scriptId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'DescribeTTSConfig',
    version = '2019-12-26',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @param request DescribeTTSConfigRequest
 * @return DescribeTTSConfigResponse
 */
async function describeTTSConfig(request: DescribeTTSConfigRequest): DescribeTTSConfigResponse {
  var runtime = new Util.RuntimeOptions{};
  return describeTTSConfigWithOptions(request, runtime);
}

model DescribeTTSDemoRequest {
  accessKey?: string(name='AccessKey'),
  aliCustomizedVoice?: string(name='AliCustomizedVoice'),
  appKey?: string(name='AppKey'),
  engine?: string(name='Engine'),
  instanceId?: string(name='InstanceId', description='This parameter is required.', example='a8eccb3c-2b26-4b6d-a54f-696b953e33a6'),
  nlsServiceType?: string(name='NlsServiceType'),
  pitchRate?: int32(name='PitchRate', example='0'),
  scriptId?: string(name='ScriptId', example='5ab2d935-306c-478a-88bf-d08e4e25c1b7'),
  secretKey?: string(name='SecretKey'),
  speechRate?: int32(name='SpeechRate', example='0'),
  text?: string(name='Text', description='This parameter is required.'),
  voice?: string(name='Voice', example='aixia'),
  volume?: int32(name='Volume', example='50'),
}

model DescribeTTSDemoResponseBody = {
  auditionUrl?: string(name='AuditionUrl', example='http://XXX/XXX'),
  code?: string(name='Code', example='OK'),
  httpStatusCode?: int32(name='HttpStatusCode', example='200'),
  message?: string(name='Message', example='Success'),
  requestId?: string(name='RequestId', example='254EB995-DEDF-48A4-9101-9CA5B72FFBCC'),
  success?: boolean(name='Success', example='true'),
}

model DescribeTTSDemoResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DescribeTTSDemoResponseBody(name='body'),
}

/**
 * @param request DescribeTTSDemoRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return DescribeTTSDemoResponse
 */
async function describeTTSDemoWithOptions(request: DescribeTTSDemoRequest, runtime: Util.RuntimeOptions): DescribeTTSDemoResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.accessKey)) {
    query['AccessKey'] = request.accessKey;
  }
  if (!Util.isUnset(request.aliCustomizedVoice)) {
    query['AliCustomizedVoice'] = request.aliCustomizedVoice;
  }
  if (!Util.isUnset(request.appKey)) {
    query['AppKey'] = request.appKey;
  }
  if (!Util.isUnset(request.engine)) {
    query['Engine'] = request.engine;
  }
  if (!Util.isUnset(request.instanceId)) {
    query['InstanceId'] = request.instanceId;
  }
  if (!Util.isUnset(request.nlsServiceType)) {
    query['NlsServiceType'] = request.nlsServiceType;
  }
  if (!Util.isUnset(request.pitchRate)) {
    query['PitchRate'] = request.pitchRate;
  }
  if (!Util.isUnset(request.scriptId)) {
    query['ScriptId'] = request.scriptId;
  }
  if (!Util.isUnset(request.secretKey)) {
    query['SecretKey'] = request.secretKey;
  }
  if (!Util.isUnset(request.speechRate)) {
    query['SpeechRate'] = request.speechRate;
  }
  if (!Util.isUnset(request.text)) {
    query['Text'] = request.text;
  }
  if (!Util.isUnset(request.voice)) {
    query['Voice'] = request.voice;
  }
  if (!Util.isUnset(request.volume)) {
    query['Volume'] = request.volume;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'DescribeTTSDemo',
    version = '2019-12-26',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @param request DescribeTTSDemoRequest
 * @return DescribeTTSDemoResponse
 */
async function describeTTSDemo(request: DescribeTTSDemoRequest): DescribeTTSDemoResponse {
  var runtime = new Util.RuntimeOptions{};
  return describeTTSDemoWithOptions(request, runtime);
}

model DescribeTagHitsSummaryRequest {
  instanceId?: string(name='InstanceId', description='This parameter is required.', example='8fa1953f-4a84-46d8-b80c-8ce9cf684fb3'),
  jobGroupId?: string(name='JobGroupId', description='This parameter is required.', example='8a4c6d3d-5ed6-44ca-b779-16c20f8862be'),
}

model DescribeTagHitsSummaryResponseBody = {
  code?: string(name='Code', example='OK'),
  httpStatusCode?: int32(name='HttpStatusCode', example='200'),
  message?: string(name='Message', example='Success'),
  requestId?: string(name='RequestId', example='5391EB13-A0E7-402D-A407-B99D4ABAF22A'),
  success?: boolean(name='Success', example='true'),
  tagGroups?: [ 
    {
      id?: string(name='Id', description='ID', example='8bb6f8ca-85a3-49f8-86a5-3127902a2156'),
      scriptId?: string(name='ScriptId', example='84fc7c41-f918-4a47-b742-a439b35a8567'),
      tagGroup?: string(name='TagGroup'),
      tagGroupIndex?: int32(name='TagGroupIndex', example='0'),
    }
  ](name='TagGroups'),
  tagHitsList?: [ 
    {
      hitCount?: int32(name='HitCount', example='1'),
      tagGroup?: string(name='TagGroup'),
      tagName?: string(name='TagName'),
    }
  ](name='TagHitsList'),
}

model DescribeTagHitsSummaryResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DescribeTagHitsSummaryResponseBody(name='body'),
}

/**
 * @param request DescribeTagHitsSummaryRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return DescribeTagHitsSummaryResponse
 */
async function describeTagHitsSummaryWithOptions(request: DescribeTagHitsSummaryRequest, runtime: Util.RuntimeOptions): DescribeTagHitsSummaryResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.instanceId)) {
    query['InstanceId'] = request.instanceId;
  }
  if (!Util.isUnset(request.jobGroupId)) {
    query['JobGroupId'] = request.jobGroupId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'DescribeTagHitsSummary',
    version = '2019-12-26',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @param request DescribeTagHitsSummaryRequest
 * @return DescribeTagHitsSummaryResponse
 */
async function describeTagHitsSummary(request: DescribeTagHitsSummaryRequest): DescribeTagHitsSummaryResponse {
  var runtime = new Util.RuntimeOptions{};
  return describeTagHitsSummaryWithOptions(request, runtime);
}

model DescribeTenantBindNumberRequest {
  number?: string(name='Number', example='95187'),
}

model DescribeTenantBindNumberResponseBody = {
  code?: string(name='Code', example='OK'),
  data?: {
    list?: [ 
      {
        instanceId?: string(name='InstanceId', example='e2d7a184-7d6c-45d4-ac24-34ab48f54669'),
        instanceName?: string(name='InstanceName', example='xxxx'),
        isBinding?: boolean(name='IsBinding', example='true'),
      }
    ](name='List'),
  }(name='Data'),
  httpStatusCode?: int32(name='HttpStatusCode', example='200'),
  message?: string(name='Message', example='Success'),
  requestId?: string(name='RequestId', example='1364f208-982d-4d0c-89aa-d56e22b47589'),
  success?: boolean(name='Success', example='true'),
}

model DescribeTenantBindNumberResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DescribeTenantBindNumberResponseBody(name='body'),
}

/**
 * @summary 号码绑定实例列表
 *
 * @param request DescribeTenantBindNumberRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return DescribeTenantBindNumberResponse
 */
async function describeTenantBindNumberWithOptions(request: DescribeTenantBindNumberRequest, runtime: Util.RuntimeOptions): DescribeTenantBindNumberResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.number)) {
    query['Number'] = request.number;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'DescribeTenantBindNumber',
    version = '2019-12-26',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 号码绑定实例列表
 *
 * @param request DescribeTenantBindNumberRequest
 * @return DescribeTenantBindNumberResponse
 */
async function describeTenantBindNumber(request: DescribeTenantBindNumberRequest): DescribeTenantBindNumberResponse {
  var runtime = new Util.RuntimeOptions{};
  return describeTenantBindNumberWithOptions(request, runtime);
}

model DialogueRequest {
  actionKey?: string(name='ActionKey', example='broadcast'),
  actionParams?: string(name='ActionParams'),
  callId?: string(name='CallId', description='This parameter is required.', example='1528189846043'),
  callType?: string(name='CallType', description='This parameter is required.', example='Outbound'),
  calledNumber?: string(name='CalledNumber', description='This parameter is required.', example='135****4353'),
  callingNumber?: string(name='CallingNumber', description='This parameter is required.', example='1***6'),
  instanceId?: string(name='InstanceId', description='This parameter is required.', example='af81a389-91f0-4157-8d82-720edd02b66a'),
  scenarioId?: string(name='ScenarioId', example='6cea9bed-63e6-439e-ae4c-b3333efff53d'),
  scriptId?: string(name='ScriptId', description='场景id', example='c5c5d8c0-c0f1-48a7-be2b-dc46006d888a'),
  taskId?: string(name='TaskId', example='ff44709e-39a6-43ba-959b-20fcabe3e496'),
  utterance?: string(name='Utterance', description='This parameter is required.'),
}

model DialogueResponseBody = {
  code?: string(name='Code', example='OK'),
  feedback?: {
    action?: string(name='Action', example='broadcast'),
    actionParams?: string(name='ActionParams'),
    content?: string(name='Content'),
    contentParams?: string(name='ContentParams', description='已废弃', example='“”'),
    interruptible?: boolean(name='Interruptible', example='true'),
  }(name='Feedback'),
  httpStatusCode?: int32(name='HttpStatusCode', example='200'),
  message?: string(name='Message', example='Success'),
  requestId?: string(name='RequestId', example='254EB995-DEDF-48A4-9101-9CA5B72FFBCC'),
  success?: boolean(name='Success', example='true'),
}

model DialogueResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DialogueResponseBody(name='body'),
}

/**
 * @param request DialogueRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return DialogueResponse
 */
async function dialogueWithOptions(request: DialogueRequest, runtime: Util.RuntimeOptions): DialogueResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.actionKey)) {
    query['ActionKey'] = request.actionKey;
  }
  if (!Util.isUnset(request.actionParams)) {
    query['ActionParams'] = request.actionParams;
  }
  if (!Util.isUnset(request.callId)) {
    query['CallId'] = request.callId;
  }
  if (!Util.isUnset(request.callType)) {
    query['CallType'] = request.callType;
  }
  if (!Util.isUnset(request.calledNumber)) {
    query['CalledNumber'] = request.calledNumber;
  }
  if (!Util.isUnset(request.callingNumber)) {
    query['CallingNumber'] = request.callingNumber;
  }
  if (!Util.isUnset(request.instanceId)) {
    query['InstanceId'] = request.instanceId;
  }
  if (!Util.isUnset(request.scenarioId)) {
    query['ScenarioId'] = request.scenarioId;
  }
  if (!Util.isUnset(request.scriptId)) {
    query['ScriptId'] = request.scriptId;
  }
  if (!Util.isUnset(request.taskId)) {
    query['TaskId'] = request.taskId;
  }
  if (!Util.isUnset(request.utterance)) {
    query['Utterance'] = request.utterance;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'Dialogue',
    version = '2019-12-26',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @param request DialogueRequest
 * @return DialogueResponse
 */
async function dialogue(request: DialogueRequest): DialogueResponse {
  var runtime = new Util.RuntimeOptions{};
  return dialogueWithOptions(request, runtime);
}

model DismissNumberDistrictInfoParsingResultRequest {
  versionId?: string(name='VersionId', example='KZpaNWMgXEfneopGBMGN9fH35b62NJjN'),
}

model DismissNumberDistrictInfoParsingResultResponseBody = {
  code?: string(name='Code', example='OK'),
  httpStatusCode?: int32(name='HttpStatusCode', example='200'),
  message?: string(name='Message', example='Success'),
  requestId?: string(name='RequestId', example='254EB995-DEDF-48A4-9101-9CA5B72FFBCC'),
  success?: boolean(name='Success', example='true'),
}

model DismissNumberDistrictInfoParsingResultResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DismissNumberDistrictInfoParsingResultResponseBody(name='body'),
}

/**
 * @summary 取消号码库解析结果
 *
 * @param request DismissNumberDistrictInfoParsingResultRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return DismissNumberDistrictInfoParsingResultResponse
 */
async function dismissNumberDistrictInfoParsingResultWithOptions(request: DismissNumberDistrictInfoParsingResultRequest, runtime: Util.RuntimeOptions): DismissNumberDistrictInfoParsingResultResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.versionId)) {
    query['VersionId'] = request.versionId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'DismissNumberDistrictInfoParsingResult',
    version = '2019-12-26',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 取消号码库解析结果
 *
 * @param request DismissNumberDistrictInfoParsingResultRequest
 * @return DismissNumberDistrictInfoParsingResultResponse
 */
async function dismissNumberDistrictInfoParsingResult(request: DismissNumberDistrictInfoParsingResultRequest): DismissNumberDistrictInfoParsingResultResponse {
  var runtime = new Util.RuntimeOptions{};
  return dismissNumberDistrictInfoParsingResultWithOptions(request, runtime);
}

model DownloadRecordingRequest {
  instanceId?: string(name='InstanceId', description='This parameter is required.', example='da37319b-6c83-4268-9f19-814aed62e401'),
  needVoiceSliceRecording?: boolean(name='NeedVoiceSliceRecording'),
  taskId?: string(name='TaskId', description='This parameter is required.', example='744b27f3-437f-4a8c-a181-f668e492fd24'),
}

model DownloadRecordingResponseBody = {
  code?: string(name='Code', example='OK'),
  downloadParams?: {
    fileName?: string(name='FileName', example='281eb174-3865-41c1-9274-7b6813edadab.wav'),
    signatureUrl?: string(name='SignatureUrl', example='http://tiangong-staging.oss-cn-shanghai.aliyuncs.com/record/281eb174-3865-41c1-9274-7b6813edadab.wav?Expires=1578624046&OSSAccessKeyId=LTAI****cqw&Signature=dL2dxWS6VcdZrvG9xOMOBMSP3Fg%3D'),
    voiceSliceRecordingListJson?: string(name='VoiceSliceRecordingListJson'),
  }(name='DownloadParams'),
  httpStatusCode?: int32(name='HttpStatusCode', example='200'),
  message?: string(name='Message', example='Success'),
  requestId?: string(name='RequestId', example='254EB995-DEDF-48A4-9101-9CA5B72FFBCC'),
  success?: boolean(name='Success', example='true'),
}

model DownloadRecordingResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DownloadRecordingResponseBody(name='body'),
}

/**
 * @summary DownloadRecording
 *
 * @param request DownloadRecordingRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return DownloadRecordingResponse
 */
async function downloadRecordingWithOptions(request: DownloadRecordingRequest, runtime: Util.RuntimeOptions): DownloadRecordingResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.instanceId)) {
    query['InstanceId'] = request.instanceId;
  }
  if (!Util.isUnset(request.needVoiceSliceRecording)) {
    query['NeedVoiceSliceRecording'] = request.needVoiceSliceRecording;
  }
  if (!Util.isUnset(request.taskId)) {
    query['TaskId'] = request.taskId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'DownloadRecording',
    version = '2019-12-26',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary DownloadRecording
 *
 * @param request DownloadRecordingRequest
 * @return DownloadRecordingResponse
 */
async function downloadRecording(request: DownloadRecordingRequest): DownloadRecordingResponse {
  var runtime = new Util.RuntimeOptions{};
  return downloadRecordingWithOptions(request, runtime);
}

model DownloadScriptRecordingRequest {
  instanceId?: string(name='InstanceId', description='This parameter is required.', example='b3865dc3-40fa-4afd-9fe4-dc7cda305a24'),
  scriptId?: string(name='ScriptId', description='This parameter is required.', example='aa279896-64a6-4182-864c-4f2b04ec8d17'),
  uuid?: string(name='Uuid', description='This parameter is required.', example='5feaab8a-97fd-4720-8108-79e017f2d3ac'),
}

model DownloadScriptRecordingResponseBody = {
  code?: string(name='Code', example='OK'),
  downloadParams?: {
    fileName?: string(name='FileName', example='281eb174-3865-41c1-9274-7b6813edadab.wav'),
    signatureUrl?: string(name='SignatureUrl', example='http://tiangong-staging.oss-cn-shanghai.aliyuncs.com/record/281eb174-3865-41c1-9274-7b6813edadab.wav?Expires=1578624046&OSSAccessKeyId=LTAI****cqw&Signature=dL2dxWS6VcdZrvG9xOMOBMSP3Fg%3D'),
  }(name='DownloadParams'),
  httpStatusCode?: int32(name='HttpStatusCode', example='200'),
  message?: string(name='Message', example='Success'),
  requestId?: string(name='RequestId', example='254EB995-DEDF-48A4-9101-9CA5B72FFBCC'),
  success?: boolean(name='Success', example='true'),
}

model DownloadScriptRecordingResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DownloadScriptRecordingResponseBody(name='body'),
}

/**
 * @param request DownloadScriptRecordingRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return DownloadScriptRecordingResponse
 */
async function downloadScriptRecordingWithOptions(request: DownloadScriptRecordingRequest, runtime: Util.RuntimeOptions): DownloadScriptRecordingResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.instanceId)) {
    query['InstanceId'] = request.instanceId;
  }
  if (!Util.isUnset(request.scriptId)) {
    query['ScriptId'] = request.scriptId;
  }
  if (!Util.isUnset(request.uuid)) {
    query['Uuid'] = request.uuid;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'DownloadScriptRecording',
    version = '2019-12-26',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @param request DownloadScriptRecordingRequest
 * @return DownloadScriptRecordingResponse
 */
async function downloadScriptRecording(request: DownloadScriptRecordingRequest): DownloadScriptRecordingResponse {
  var runtime = new Util.RuntimeOptions{};
  return downloadScriptRecordingWithOptions(request, runtime);
}

model DuplicateScriptRequest {
  instanceId?: string(name='InstanceId', description='This parameter is required.', example='361c8a53-0e29-42f3-8aa7-c7752d010399'),
  name?: string(name='Name', description='This parameter is required.'),
  sourceScriptId?: string(name='SourceScriptId', description='This parameter is required.', example='6114e7e8-4140-48d9-b46d-65ea29f13fe8'),
}

model DuplicateScriptResponseBody = {
  code?: string(name='Code', example='OK'),
  httpStatusCode?: int32(name='HttpStatusCode', example='200'),
  message?: string(name='Message', example='Success'),
  requestId?: string(name='RequestId', example='254EB995-DEDF-48A4-9101-9CA5B72FFBCC'),
  scriptId?: string(name='ScriptId', example='6114e7e8-4140-48d9-b46d-65ea29f13fe8'),
  success?: boolean(name='Success', example='true'),
}

model DuplicateScriptResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DuplicateScriptResponseBody(name='body'),
}

/**
 * @param request DuplicateScriptRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return DuplicateScriptResponse
 */
async function duplicateScriptWithOptions(request: DuplicateScriptRequest, runtime: Util.RuntimeOptions): DuplicateScriptResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.instanceId)) {
    query['InstanceId'] = request.instanceId;
  }
  if (!Util.isUnset(request.name)) {
    query['Name'] = request.name;
  }
  if (!Util.isUnset(request.sourceScriptId)) {
    query['SourceScriptId'] = request.sourceScriptId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'DuplicateScript',
    version = '2019-12-26',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @param request DuplicateScriptRequest
 * @return DuplicateScriptResponse
 */
async function duplicateScript(request: DuplicateScriptRequest): DuplicateScriptResponse {
  var runtime = new Util.RuntimeOptions{};
  return duplicateScriptWithOptions(request, runtime);
}

model ExportScriptRequest {
  instanceId?: string(name='InstanceId', description='This parameter is required.', example='12f3dd08-0c55-44ce-9b64-e69d35ed3a76'),
  scriptId?: string(name='ScriptId', description='This parameter is required.', example='d004cfd2-6a81-491c-83c6-cbe186620c95'),
}

model ExportScriptResponseBody = {
  code?: string(name='Code', example='OK'),
  downloadParams?: {
    signatureUrl?: string(name='SignatureUrl', example='http://tiangong-staging.oss-cn-shanghai.aliyuncs.com/record/281eb174-3865-41c1-9274-7b6813edadab.wav?Expires=1578624046&OSSAccessKeyId=LTAI****cqw&Signature=dL2dxWS6VcdZrvG9xOMOBMSP3Fg%3D'),
  }(name='DownloadParams'),
  httpStatusCode?: int32(name='HttpStatusCode', example='200'),
  message?: string(name='Message', example='Success'),
  requestId?: string(name='RequestId', example='254EB995-DEDF-48A4-9101-9CA5B72FFBCC'),
  success?: boolean(name='Success', example='true'),
}

model ExportScriptResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: ExportScriptResponseBody(name='body'),
}

/**
 * @param request ExportScriptRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return ExportScriptResponse
 */
async function exportScriptWithOptions(request: ExportScriptRequest, runtime: Util.RuntimeOptions): ExportScriptResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.instanceId)) {
    query['InstanceId'] = request.instanceId;
  }
  if (!Util.isUnset(request.scriptId)) {
    query['ScriptId'] = request.scriptId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'ExportScript',
    version = '2019-12-26',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @param request ExportScriptRequest
 * @return ExportScriptResponse
 */
async function exportScript(request: ExportScriptRequest): ExportScriptResponse {
  var runtime = new Util.RuntimeOptions{};
  return exportScriptWithOptions(request, runtime);
}

model GenerateUploadUrlRequest {
  fileName?: string(name='FileName', example='faaf8508-9542-4ac4-84a2-0ddcbb5f79a6 (2).json'),
  key?: string(name='Key', example='3b9b5dc6d67ee9fa'),
}

model GenerateUploadUrlResponseBody = {
  code?: string(name='Code', example='OK'),
  data?: {
    accessId?: string(name='AccessId', example='LTAIvKWEr4DoFSqz'),
    expire?: int32(name='Expire', example='1742960933'),
    folder?: string(name='Folder', example='pload/file/874d7371-791b-4281-935c-637630a37785/874d7371-791b-4281-935c-637630a37785_9bd7916d-a340-4925-a911-92390cbe0f33.json'),
    host?: string(name='Host', example='https://cloudagentbot-online.oss-cn-hangzhou.aliyuncs.com'),
    message?: string(name='Message', example='Success'),
    policy?: string(name='Policy', example='eyJleHBpcmF0aW9uIjoiMjAyNS0wMy0yNlQwMzo0ODo1My4wMzVaIiwiY29uZGl0aW9ucyI6W1siY29udGVudC1sZW5ndGgtcmFuZ2UiLDAsNTI0Mjg4MF0sWyJzdGFydHMtd2l0aCIsIiRrZXkiLCJ1cGxvYWQvZmlsZS84NzRkNzM3MS03OTFiLTQyODEtOTM1Yy02Mzc2MzBhMzc3ODUvIl1dfQ==",'),
    signature?: string(name='Signature', example='I6d1ONWVuTj5i0Kz4Vn+V0lC6v4='),
    success?: boolean(name='Success', example='true'),
  }(name='Data'),
  httpStatusCode?: int32(name='HttpStatusCode', example='200'),
  message?: string(name='Message', example='Success'),
  requestId?: string(name='RequestId', example='254EB995-DEDF-48A4-9101-9CA5B72FFBCC'),
  success?: boolean(name='Success', example='true'),
}

model GenerateUploadUrlResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: GenerateUploadUrlResponseBody(name='body'),
}

/**
 * @param request GenerateUploadUrlRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return GenerateUploadUrlResponse
 */
async function generateUploadUrlWithOptions(request: GenerateUploadUrlRequest, runtime: Util.RuntimeOptions): GenerateUploadUrlResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.fileName)) {
    query['FileName'] = request.fileName;
  }
  if (!Util.isUnset(request.key)) {
    query['Key'] = request.key;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'GenerateUploadUrl',
    version = '2019-12-26',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @param request GenerateUploadUrlRequest
 * @return GenerateUploadUrlResponse
 */
async function generateUploadUrl(request: GenerateUploadUrlRequest): GenerateUploadUrlResponse {
  var runtime = new Util.RuntimeOptions{};
  return generateUploadUrlWithOptions(request, runtime);
}

model GetAfterAnswerDelayPlaybackRequest {
  entryId?: string(name='EntryId', description='This parameter is required.', example='c46001bc-3ead-4bfd-9a69-4b5b66a4a3f4'),
  strategyLevel?: int32(name='StrategyLevel', example='2'),
}

model GetAfterAnswerDelayPlaybackResponseBody = {
  afterAnswerDelayPlayback?: int32(name='AfterAnswerDelayPlayback', example='500'),
  code?: string(name='Code', example='OK'),
  httpStatusCode?: int32(name='HttpStatusCode', example='200'),
  message?: string(name='Message', example='Success'),
  requestId?: string(name='RequestId', example='254EB995-DEDF-48A4-9101-9CA5B72FFBCC'),
  success?: boolean(name='Success', example='true'),
}

model GetAfterAnswerDelayPlaybackResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: GetAfterAnswerDelayPlaybackResponseBody(name='body'),
}

/**
 * @param request GetAfterAnswerDelayPlaybackRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return GetAfterAnswerDelayPlaybackResponse
 */
async function getAfterAnswerDelayPlaybackWithOptions(request: GetAfterAnswerDelayPlaybackRequest, runtime: Util.RuntimeOptions): GetAfterAnswerDelayPlaybackResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.entryId)) {
    query['EntryId'] = request.entryId;
  }
  if (!Util.isUnset(request.strategyLevel)) {
    query['StrategyLevel'] = request.strategyLevel;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'GetAfterAnswerDelayPlayback',
    version = '2019-12-26',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @param request GetAfterAnswerDelayPlaybackRequest
 * @return GetAfterAnswerDelayPlaybackResponse
 */
async function getAfterAnswerDelayPlayback(request: GetAfterAnswerDelayPlaybackRequest): GetAfterAnswerDelayPlaybackResponse {
  var runtime = new Util.RuntimeOptions{};
  return getAfterAnswerDelayPlaybackWithOptions(request, runtime);
}

model GetAgentProfileRequest {
  agentProfileId?: string(name='AgentProfileId', description='This parameter is required.', example='37ca3ca1ac4b4e57adf3da5b5d939d04'),
  appIp?: string(name='AppIp', example='127.0.0.1'),
  instanceId?: string(name='InstanceId', description='This parameter is required.', example='0ec0c897-b92c-40e4-9ad7-e6e4f5ce13bb'),
}

model GetAgentProfileResponseBody = {
  code?: string(name='Code', example='OK'),
  data?: {
    agentProfileId?: string(name='AgentProfileId', example='37ca3ca1ac4b4e57adf3da5b5d939d04'),
    agentProfileTemplateId?: string(name='AgentProfileTemplateId', example='default-survey'),
    agentType?: string(name='AgentType', description='agent type', example='""'),
    apiPluginJson?: string(name='ApiPluginJson', example='[]'),
    createTime?: string(name='CreateTime', example='1741338619000'),
    description?: string(name='Description'),
    instanceId?: string(name='InstanceId', example='7f04f92c-ccfc-4f8f-a816-6902023be5c6'),
    instructionJson?: string(name='InstructionJson', example='[{"type":"TransferToAgent","instructions":[{"code":"Transfer0","skillGroupId":"123","skillGroupName":"123"}],"timeoutEnable":false},{"type":"CollectNumber","instructions":[]}]'),
    labelsJson?: string(name='LabelsJson'),
    model?: string(name='Model', example='model_002'),
    modelConfig?: string(name='ModelConfig', example='{}'),
    nluConfigJson?: string(name='NluConfigJson', example='{"chatbotInstanceId":"chatbot-cn-j7eiVJZRmb","faqCategoryIds":[30000474726],"llmAgentId":"1246206","llmAgentInstanceId":"outbound_05efb75a-95df-438e-9b9b-8f2c857d5498","llmAgentKey":"d682716514814815ae77757c0bcbda01_p_outbound_public"}'),
    prompt?: string(name='Prompt', example='""'),
    promptJson?: string(name='PromptJson'),
    scenario?: string(name='Scenario'),
    scriptId?: string(name='ScriptId', example='d13ad2d3-3fe6-4352-b38b-bd6559047de8'),
    system?: boolean(name='System', example='false'),
    updateTime?: string(name='UpdateTime', example='1741338619000'),
    variablesJson?: string(name='VariablesJson'),
  }(name='Data'),
  httpStatusCode?: int32(name='HttpStatusCode', example='200'),
  message?: string(name='Message', example='Success'),
  requestId?: string(name='RequestId', example='7A573837-3AD3-54CF-930A-07A3287042C2'),
  success?: boolean(name='Success', example='true'),
}

model GetAgentProfileResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: GetAgentProfileResponseBody(name='body'),
}

/**
 * @param request GetAgentProfileRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return GetAgentProfileResponse
 */
async function getAgentProfileWithOptions(request: GetAgentProfileRequest, runtime: Util.RuntimeOptions): GetAgentProfileResponse {
  Util.validateModel(request);
  var body : map[string]any = {};
  if (!Util.isUnset(request.agentProfileId)) {
    body['AgentProfileId'] = request.agentProfileId;
  }
  if (!Util.isUnset(request.appIp)) {
    body['AppIp'] = request.appIp;
  }
  if (!Util.isUnset(request.instanceId)) {
    body['InstanceId'] = request.instanceId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'GetAgentProfile',
    version = '2019-12-26',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @param request GetAgentProfileRequest
 * @return GetAgentProfileResponse
 */
async function getAgentProfile(request: GetAgentProfileRequest): GetAgentProfileResponse {
  var runtime = new Util.RuntimeOptions{};
  return getAgentProfileWithOptions(request, runtime);
}

model GetAgentProfileTemplateRequest {
  agentProfileTemplateId?: string(name='AgentProfileTemplateId', description='This parameter is required.', example='default-survey'),
  appIp?: string(name='AppIp', example='127.0.0.1'),
}

model GetAgentProfileTemplateResponseBody = {
  code?: string(name='Code', example='OK'),
  data?: {
    agentProfileTemplateId?: string(name='AgentProfileTemplateId', example='default-survey'),
    createTime?: string(name='CreateTime', example='1720766491000'),
    description?: string(name='Description'),
    name?: string(name='Name'),
    promptSchema?: string(name='PromptSchema'),
    updateTime?: string(name='UpdateTime', example='1720766491000'),
  }(name='Data'),
  httpStatusCode?: int32(name='HttpStatusCode', example='200'),
  message?: string(name='Message', example='Success'),
  requestId?: string(name='RequestId', example='254EB995-DEDF-48A4-9101-9CA5B72FFBCC'),
  success?: boolean(name='Success', example='true'),
}

model GetAgentProfileTemplateResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: GetAgentProfileTemplateResponseBody(name='body'),
}

/**
 * @param request GetAgentProfileTemplateRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return GetAgentProfileTemplateResponse
 */
async function getAgentProfileTemplateWithOptions(request: GetAgentProfileTemplateRequest, runtime: Util.RuntimeOptions): GetAgentProfileTemplateResponse {
  Util.validateModel(request);
  var body : map[string]any = {};
  if (!Util.isUnset(request.agentProfileTemplateId)) {
    body['AgentProfileTemplateId'] = request.agentProfileTemplateId;
  }
  if (!Util.isUnset(request.appIp)) {
    body['AppIp'] = request.appIp;
  }
  var req = new OpenApi.OpenApiRequest{ 
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'GetAgentProfileTemplate',
    version = '2019-12-26',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @param request GetAgentProfileTemplateRequest
 * @return GetAgentProfileTemplateResponse
 */
async function getAgentProfileTemplate(request: GetAgentProfileTemplateRequest): GetAgentProfileTemplateResponse {
  var runtime = new Util.RuntimeOptions{};
  return getAgentProfileTemplateWithOptions(request, runtime);
}

model GetAnnotationMissionSummaryRequest {
  annotationMissionId?: string(name='AnnotationMissionId', example='50e53ac8-24a4-46d5-b174-ee88867f4780'),
}

model GetAnnotationMissionSummaryResponseBody = {
  code?: string(name='Code', example='OK'),
  data?: {
    annotationMissionId?: string(name='AnnotationMissionId', example='b3f2c931-5180-43ca-b4aa-2baee2d73c8b'),
    asrSummaryInfo?: {
      addCustomizationDataCount?: int32(name='AddCustomizationDataCount', example='1'),
      addVocabularyDataCount?: int32(name='AddVocabularyDataCount', example='1'),
      annotationInvalid?: int32(name='AnnotationInvalid', example='1'),
      characterCorrectRate?: int32(name='CharacterCorrectRate', example='1'),
      characterErrorRate?: int32(name='CharacterErrorRate', example='1'),
      chatTotalCount?: int32(name='ChatTotalCount', example='1'),
      noAnnotation?: int32(name='NoAnnotation', example='1'),
      sentenceErrorRate?: int32(name='SentenceErrorRate', example='1'),
      wordErrorRate?: int32(name='WordErrorRate', example='1'),
    }(name='AsrSummaryInfo'),
    intentSummaryInfo?: {
      annotationCorrectCount?: int32(name='AnnotationCorrectCount', example='1'),
      annotationInvalid?: int32(name='AnnotationInvalid', example='1'),
      chatTotalCount?: int32(name='ChatTotalCount', example='1'),
      intentUserSayCount?: int32(name='IntentUserSayCount', example='1'),
      intentionNotCoveredCount?: int32(name='IntentionNotCoveredCount', example='1'),
      matchErrorCount?: int32(name='MatchErrorCount', example='1'),
      noAnnotation?: int32(name='NoAnnotation', example='1'),
      translationUnrecognizedCount?: int32(name='TranslationUnrecognizedCount', example='1'),
    }(name='IntentSummaryInfo'),
    message?: string(name='Message', example='You are not authorized to perform this action. CDR:View privileges are required.'),
    success?: boolean(name='Success', example='true'),
    tagSummaryInfo?: {
      tagSummaryInfoDetailList?: [ 
        {
          count?: int32(name='Count', example='3'),
          name?: string(name='Name'),
        }
      ](name='TagSummaryInfoDetailList'),
    }(name='TagSummaryInfo'),
  }(name='Data'),
  httpStatusCode?: int32(name='HttpStatusCode', example='200'),
  message?: string(name='Message', example='You are not authorized to perform this action. CDR:View privileges are required.'),
  requestId?: string(name='RequestId', example='254EB995-DEDF-48A4-9101-9CA5B72FFBCC'),
  success?: boolean(name='Success', example='true'),
}

model GetAnnotationMissionSummaryResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: GetAnnotationMissionSummaryResponseBody(name='body'),
}

/**
 * @param request GetAnnotationMissionSummaryRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return GetAnnotationMissionSummaryResponse
 */
async function getAnnotationMissionSummaryWithOptions(request: GetAnnotationMissionSummaryRequest, runtime: Util.RuntimeOptions): GetAnnotationMissionSummaryResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.annotationMissionId)) {
    query['AnnotationMissionId'] = request.annotationMissionId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'GetAnnotationMissionSummary',
    version = '2019-12-26',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @param request GetAnnotationMissionSummaryRequest
 * @return GetAnnotationMissionSummaryResponse
 */
async function getAnnotationMissionSummary(request: GetAnnotationMissionSummaryRequest): GetAnnotationMissionSummaryResponse {
  var runtime = new Util.RuntimeOptions{};
  return getAnnotationMissionSummaryWithOptions(request, runtime);
}

model GetAnnotationMissionTagInfoListRequest {
  instanceId?: string(name='InstanceId', example='4eee9bf8-1319-468f-ac82-83c50ae389f8'),
  pageIndex?: int32(name='PageIndex', example='1'),
  pageSize?: int32(name='PageSize', example='10'),
}

model GetAnnotationMissionTagInfoListResponseBody = {
  code?: string(name='Code', example='OK'),
  data?: {
    annotationMissionTagInfoList?: [ 
      {
        annotationMissionTagInfoDescription?: string(name='AnnotationMissionTagInfoDescription'),
        annotationMissionTagInfoId?: string(name='AnnotationMissionTagInfoId', example='e1ee87ea-ebad-4079-aebb-1c56a4ef0c06'),
        annotationMissionTagInfoName?: string(name='AnnotationMissionTagInfoName'),
        delete?: boolean(name='Delete', example='false'),
        instanceId?: string(name='InstanceId', example='3c3b8d1d-deff-48d9-9318-addc80ae5b1e'),
        tenantId?: string(name='TenantId', example='DING_ORG_dingbd9daecdb7aaed3bffe93478753d9884'),
      }
    ](name='AnnotationMissionTagInfoList'),
    message?: string(name='Message', example='CDR \\\\"job-efbaeefc-4d45-4e79-83f7-b33b0769c969\\\\" doesn\\\\"t exists.'),
    success?: boolean(name='Success', example='true'),
  }(name='Data'),
  httpStatusCode?: int32(name='HttpStatusCode', example='200'),
  message?: string(name='Message', example='CDR \\\\"job-efbaeefc-4d45-4e79-83f7-b33b0769c969\\\\" doesn\\\\"t exists.'),
  requestId?: string(name='RequestId', example='254EB995-DEDF-48A4-9101-9CA5B72FFBCC'),
  success?: boolean(name='Success', example='true'),
}

model GetAnnotationMissionTagInfoListResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: GetAnnotationMissionTagInfoListResponseBody(name='body'),
}

/**
 * @param request GetAnnotationMissionTagInfoListRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return GetAnnotationMissionTagInfoListResponse
 */
async function getAnnotationMissionTagInfoListWithOptions(request: GetAnnotationMissionTagInfoListRequest, runtime: Util.RuntimeOptions): GetAnnotationMissionTagInfoListResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.instanceId)) {
    query['InstanceId'] = request.instanceId;
  }
  if (!Util.isUnset(request.pageIndex)) {
    query['PageIndex'] = request.pageIndex;
  }
  if (!Util.isUnset(request.pageSize)) {
    query['PageSize'] = request.pageSize;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'GetAnnotationMissionTagInfoList',
    version = '2019-12-26',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @param request GetAnnotationMissionTagInfoListRequest
 * @return GetAnnotationMissionTagInfoListResponse
 */
async function getAnnotationMissionTagInfoList(request: GetAnnotationMissionTagInfoListRequest): GetAnnotationMissionTagInfoListResponse {
  var runtime = new Util.RuntimeOptions{};
  return getAnnotationMissionTagInfoListWithOptions(request, runtime);
}

model GetAsrServerInfoRequest {
  entryId?: string(name='EntryId', example='024f8cf0-c842-4c01-b74b-c8667e4579c7'),
  strategyLevel?: int32(name='StrategyLevel', example='2'),
}

model GetAsrServerInfoResponseBody = {
  code?: string(name='Code', example='OK'),
  httpStatusCode?: int32(name='HttpStatusCode', example='200'),
  message?: string(name='Message', example='Success'),
  requestId?: string(name='RequestId', example='254EB995-DEDF-48A4-9101-9CA5B72FFBCC'),
  success?: boolean(name='Success', example='true'),
}

model GetAsrServerInfoResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: GetAsrServerInfoResponseBody(name='body'),
}

/**
 * @param request GetAsrServerInfoRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return GetAsrServerInfoResponse
 */
async function getAsrServerInfoWithOptions(request: GetAsrServerInfoRequest, runtime: Util.RuntimeOptions): GetAsrServerInfoResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.entryId)) {
    query['EntryId'] = request.entryId;
  }
  if (!Util.isUnset(request.strategyLevel)) {
    query['StrategyLevel'] = request.strategyLevel;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'GetAsrServerInfo',
    version = '2019-12-26',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @param request GetAsrServerInfoRequest
 * @return GetAsrServerInfoResponse
 */
async function getAsrServerInfo(request: GetAsrServerInfoRequest): GetAsrServerInfoResponse {
  var runtime = new Util.RuntimeOptions{};
  return getAsrServerInfoWithOptions(request, runtime);
}

model GetBaseStrategyPeriodRequest {
  entryId?: string(name='EntryId', description='This parameter is required.', example='024f8cf0-c842-4c01-b74b-c8667e4579c7'),
  strategyLevel?: int32(name='StrategyLevel', example='2'),
}

model GetBaseStrategyPeriodResponseBody = {
  code?: string(name='Code', example='OK'),
  httpStatusCode?: int32(name='HttpStatusCode', example='200'),
  message?: string(name='Message', example='Success'),
  onlyWeekdays?: boolean(name='OnlyWeekdays', example='false'),
  onlyWorkdays?: boolean(name='OnlyWorkdays'),
  requestId?: string(name='RequestId', example='254EB995-DEDF-48A4-9101-9CA5B72FFBCC'),
  success?: boolean(name='Success', example='true'),
  workingTime?: [ 
    {
      beginTime?: string(name='BeginTime', example='00:00:00'),
      beginTimeMillis?: long(name='BeginTimeMillis', example='0'),
      endTime?: string(name='EndTime', example='00:00:00'),
      endTimeMillis?: long(name='EndTimeMillis', example='0'),
    }
  ](name='WorkingTime', example='[]'),
}

model GetBaseStrategyPeriodResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: GetBaseStrategyPeriodResponseBody(name='body'),
}

/**
 * @param request GetBaseStrategyPeriodRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return GetBaseStrategyPeriodResponse
 */
async function getBaseStrategyPeriodWithOptions(request: GetBaseStrategyPeriodRequest, runtime: Util.RuntimeOptions): GetBaseStrategyPeriodResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.entryId)) {
    query['EntryId'] = request.entryId;
  }
  if (!Util.isUnset(request.strategyLevel)) {
    query['StrategyLevel'] = request.strategyLevel;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'GetBaseStrategyPeriod',
    version = '2019-12-26',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @param request GetBaseStrategyPeriodRequest
 * @return GetBaseStrategyPeriodResponse
 */
async function getBaseStrategyPeriod(request: GetBaseStrategyPeriodRequest): GetBaseStrategyPeriodResponse {
  var runtime = new Util.RuntimeOptions{};
  return getBaseStrategyPeriodWithOptions(request, runtime);
}

model GetConcurrentConversationQuotaResponseBody = {
  code?: string(name='Code', example='OK'),
  httpStatusCode?: int32(name='HttpStatusCode', example='200'),
  maxConcurrent?: int32(name='MaxConcurrent', description='maxConcurrent', example='10'),
  message?: string(name='Message', example='Success'),
  remainingConcurrent?: int32(name='RemainingConcurrent', example='2'),
  requestId?: string(name='RequestId', example='254EB995-DEDF-48A4-9101-9CA5B72FFBCC'),
  success?: boolean(name='Success', example='true'),
}

model GetConcurrentConversationQuotaResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: GetConcurrentConversationQuotaResponseBody(name='body'),
}

/**
 * @param request GetConcurrentConversationQuotaRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return GetConcurrentConversationQuotaResponse
 */
async function getConcurrentConversationQuotaWithOptions(runtime: Util.RuntimeOptions): GetConcurrentConversationQuotaResponse {
  var req = new OpenApi.OpenApiRequest{};
  var params = new OpenApi.Params{
    action = 'GetConcurrentConversationQuota',
    version = '2019-12-26',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @return GetConcurrentConversationQuotaResponse
 */
async function getConcurrentConversationQuota(): GetConcurrentConversationQuotaResponse {
  var runtime = new Util.RuntimeOptions{};
  return getConcurrentConversationQuotaWithOptions(runtime);
}

model GetContactBlockListRequest {
  countTotalRow?: boolean(name='CountTotalRow', example='100'),
  instanceId?: string(name='InstanceId', description='This parameter is required.', example='846e20ae-e113-4231-a792-cb354187c9f6'),
  pageNumber?: int32(name='PageNumber', example='1'),
  pageSize?: int32(name='PageSize', example='10'),
}

model GetContactBlockListResponseBody = {
  code?: string(name='Code', example='OK'),
  contactBlocklistList?: {
    list?: [ 
      {
        contactBlockListId?: string(name='ContactBlockListId', example='254EB995-DEDF-48A4-9101-9CA5B72FFBCC'),
        creationTime?: long(name='CreationTime', example='1640077685465'),
        creator?: string(name='Creator', example='xxx'),
        instanceId?: string(name='InstanceId', example='254EB995-DEDF-48A4-9101-9CA5B72FFBCC'),
        name?: string(name='Name', example='xxx'),
        operator?: string(name='Operator', example='xxx'),
        phoneNumber?: string(name='PhoneNumber', example='1388888888'),
        remark?: string(name='Remark', example='xxxx'),
      }
    ](name='List', example='[]'),
    pageNumber?: int32(name='PageNumber', example='1'),
    pageSize?: int32(name='PageSize', example='10'),
    totalCount?: int32(name='TotalCount', example='100'),
  }(name='ContactBlocklistList', example='{}'),
  httpStatusCode?: int32(name='HttpStatusCode', example='200'),
  message?: string(name='Message', example='Success'),
  requestId?: string(name='RequestId', example='254EB995-DEDF-48A4-9101-9CA5B72FFBCC'),
  success?: boolean(name='Success', example='true'),
}

model GetContactBlockListResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: GetContactBlockListResponseBody(name='body'),
}

/**
 * @param request GetContactBlockListRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return GetContactBlockListResponse
 */
async function getContactBlockListWithOptions(request: GetContactBlockListRequest, runtime: Util.RuntimeOptions): GetContactBlockListResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.countTotalRow)) {
    query['CountTotalRow'] = request.countTotalRow;
  }
  if (!Util.isUnset(request.instanceId)) {
    query['InstanceId'] = request.instanceId;
  }
  if (!Util.isUnset(request.pageNumber)) {
    query['PageNumber'] = request.pageNumber;
  }
  if (!Util.isUnset(request.pageSize)) {
    query['PageSize'] = request.pageSize;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'GetContactBlockList',
    version = '2019-12-26',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @param request GetContactBlockListRequest
 * @return GetContactBlockListResponse
 */
async function getContactBlockList(request: GetContactBlockListRequest): GetContactBlockListResponse {
  var runtime = new Util.RuntimeOptions{};
  return getContactBlockListWithOptions(request, runtime);
}

model GetContactWhiteListRequest {
  countTotalRow?: boolean(name='CountTotalRow', example='true'),
  instanceId?: string(name='InstanceId', description='This parameter is required.', example='2a830781-324e-4568-ae96-309f93090fe1'),
  pageNumber?: int32(name='PageNumber', example='1'),
  pageSize?: int32(name='PageSize', example='10'),
}

model GetContactWhiteListResponseBody = {
  code?: string(name='Code', example='OK'),
  contactWhitelistList?: {
    list?: [ 
      {
        contactWhiteListId?: string(name='ContactWhiteListId', example='254EB995-DEDF-48A4-9101-9CA5B72FFBCC'),
        creationTime?: long(name='CreationTime', example='1640174411848'),
        creator?: string(name='Creator'),
        instanceId?: string(name='InstanceId', example='254EB995-DEDF-48A4-9101-9CA5B72FFBCC'),
        name?: string(name='Name'),
        operator?: string(name='Operator', example='xxx'),
        phoneNumber?: string(name='PhoneNumber', example='13959999999'),
        remark?: string(name='Remark', example='xxxx'),
      }
    ](name='List', example='{}'),
    pageNumber?: int32(name='PageNumber', example='1'),
    pageSize?: int32(name='PageSize', example='10'),
    totalCount?: int32(name='TotalCount', example='100'),
  }(name='ContactWhitelistList', example='{}'),
  httpStatusCode?: int32(name='HttpStatusCode', example='200'),
  message?: string(name='Message', example='Success'),
  requestId?: string(name='RequestId', example='254EB995-DEDF-48A4-9101-9CA5B72FFBCC'),
  success?: boolean(name='Success', example='true'),
}

model GetContactWhiteListResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: GetContactWhiteListResponseBody(name='body'),
}

/**
 * @param request GetContactWhiteListRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return GetContactWhiteListResponse
 */
async function getContactWhiteListWithOptions(request: GetContactWhiteListRequest, runtime: Util.RuntimeOptions): GetContactWhiteListResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.countTotalRow)) {
    query['CountTotalRow'] = request.countTotalRow;
  }
  if (!Util.isUnset(request.instanceId)) {
    query['InstanceId'] = request.instanceId;
  }
  if (!Util.isUnset(request.pageNumber)) {
    query['PageNumber'] = request.pageNumber;
  }
  if (!Util.isUnset(request.pageSize)) {
    query['PageSize'] = request.pageSize;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'GetContactWhiteList',
    version = '2019-12-26',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @param request GetContactWhiteListRequest
 * @return GetContactWhiteListResponse
 */
async function getContactWhiteList(request: GetContactWhiteListRequest): GetContactWhiteListResponse {
  var runtime = new Util.RuntimeOptions{};
  return getContactWhiteListWithOptions(request, runtime);
}

model GetCurrentConcurrencyRequest {
  instanceId?: string(name='InstanceId', description='This parameter is required.', example='361c8a53-0e29-42f3-8aa7-c7752d010399'),
}

model GetCurrentConcurrencyResponseBody = {
  code?: string(name='Code', example='OK'),
  currentConcurrency?: int32(name='CurrentConcurrency', example='12'),
  httpStatusCode?: int32(name='HttpStatusCode', example='200'),
  instanceId?: string(name='InstanceId', example='12f3dd08-0c55-44ce-9b64-e69d35ed3a76'),
  maxConcurrentConversation?: int32(name='MaxConcurrentConversation', example='5'),
  message?: string(name='Message', example='Success'),
  requestId?: string(name='RequestId', example='254EB995-DEDF-48A4-9101-9CA5B72FFBCC'),
  success?: boolean(name='Success', example='true'),
}

model GetCurrentConcurrencyResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: GetCurrentConcurrencyResponseBody(name='body'),
}

/**
 * @param request GetCurrentConcurrencyRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return GetCurrentConcurrencyResponse
 */
async function getCurrentConcurrencyWithOptions(request: GetCurrentConcurrencyRequest, runtime: Util.RuntimeOptions): GetCurrentConcurrencyResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.instanceId)) {
    query['InstanceId'] = request.instanceId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'GetCurrentConcurrency',
    version = '2019-12-26',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @param request GetCurrentConcurrencyRequest
 * @return GetCurrentConcurrencyResponse
 */
async function getCurrentConcurrency(request: GetCurrentConcurrencyRequest): GetCurrentConcurrencyResponse {
  var runtime = new Util.RuntimeOptions{};
  return getCurrentConcurrencyWithOptions(request, runtime);
}

model GetEffectiveDaysRequest {
  entryId?: string(name='EntryId', description='This parameter is required.', example='e90b5b8e-c8b4-4182-b28d-a5aa81685e49'),
  strategyLevel?: int32(name='StrategyLevel', example='2'),
}

model GetEffectiveDaysResponseBody = {
  code?: string(name='Code', example='OK'),
  effectiveDays?: int32(name='EffectiveDays', example='7'),
  httpStatusCode?: int32(name='HttpStatusCode', example='200'),
  message?: string(name='Message', example='Success'),
  requestId?: string(name='RequestId', example='Success'),
  success?: boolean(name='Success', example='true'),
}

model GetEffectiveDaysResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: GetEffectiveDaysResponseBody(name='body'),
}

/**
 * @param request GetEffectiveDaysRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return GetEffectiveDaysResponse
 */
async function getEffectiveDaysWithOptions(request: GetEffectiveDaysRequest, runtime: Util.RuntimeOptions): GetEffectiveDaysResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.entryId)) {
    query['EntryId'] = request.entryId;
  }
  if (!Util.isUnset(request.strategyLevel)) {
    query['StrategyLevel'] = request.strategyLevel;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'GetEffectiveDays',
    version = '2019-12-26',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @param request GetEffectiveDaysRequest
 * @return GetEffectiveDaysResponse
 */
async function getEffectiveDays(request: GetEffectiveDaysRequest): GetEffectiveDaysResponse {
  var runtime = new Util.RuntimeOptions{};
  return getEffectiveDaysWithOptions(request, runtime);
}

model GetEmptyNumberNoMoreCallsInfoRequest {
  entryId?: string(name='EntryId', description='This parameter is required.', example='db3e679b-7d5e-4d9b-828a-345adca455f3'),
  strategyLevel?: int32(name='StrategyLevel', example='2'),
}

model GetEmptyNumberNoMoreCallsInfoResponseBody = {
  code?: string(name='Code', example='OK'),
  emptyNumberNoMoreCalls?: boolean(name='EmptyNumberNoMoreCalls', example='true'),
  httpStatusCode?: int32(name='HttpStatusCode', example='200'),
  message?: string(name='Message', example='Success'),
  requestId?: string(name='RequestId', example='254EB995-DEDF-48A4-9101-9CA5B72FFBCC'),
  success?: boolean(name='Success', example='true'),
}

model GetEmptyNumberNoMoreCallsInfoResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: GetEmptyNumberNoMoreCallsInfoResponseBody(name='body'),
}

/**
 * @param request GetEmptyNumberNoMoreCallsInfoRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return GetEmptyNumberNoMoreCallsInfoResponse
 */
async function getEmptyNumberNoMoreCallsInfoWithOptions(request: GetEmptyNumberNoMoreCallsInfoRequest, runtime: Util.RuntimeOptions): GetEmptyNumberNoMoreCallsInfoResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.entryId)) {
    query['EntryId'] = request.entryId;
  }
  if (!Util.isUnset(request.strategyLevel)) {
    query['StrategyLevel'] = request.strategyLevel;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'GetEmptyNumberNoMoreCallsInfo',
    version = '2019-12-26',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @param request GetEmptyNumberNoMoreCallsInfoRequest
 * @return GetEmptyNumberNoMoreCallsInfoResponse
 */
async function getEmptyNumberNoMoreCallsInfo(request: GetEmptyNumberNoMoreCallsInfoRequest): GetEmptyNumberNoMoreCallsInfoResponse {
  var runtime = new Util.RuntimeOptions{};
  return getEmptyNumberNoMoreCallsInfoWithOptions(request, runtime);
}

model GetJobDataUploadParamsRequest {
  busiType?: string(name='BusiType', example='SCRIPT_RECORDING'),
  fileName?: string(name='FileName', description='This parameter is required.'),
  instanceId?: string(name='InstanceId', description='This parameter is required.', example='4eee9bf8-1319-468f-ac82-83c50ae389f8'),
  path?: string(name='Path', example='//airwaybill/1237185904146124802'),
  uniqueId?: string(name='UniqueId', example='sas_siema_1477832102462645_siem_f07e90c2c147cf8cf1549ccb974e1956'),
}

model GetJobDataUploadParamsResponseBody = {
  code?: string(name='Code', example='OK'),
  httpStatusCode?: int32(name='HttpStatusCode', example='200'),
  message?: string(name='Message', example='Success'),
  requestId?: string(name='RequestId', example='254EB995-DEDF-48A4-9101-9CA5B72FFBCC'),
  success?: boolean(name='Success', example='True'),
  uploadParams?: {
    accessId?: string(name='AccessId', example='LTAIvKWEr4DoFSqz'),
    expire?: int32(name='Expire', example='1741855527'),
    folder?: string(name='Folder', example='UPLOADED/SCRIPT/136a055e-3d07-46c6-853a-731b3a2973de/18dc6d79-338f-413c-a5a8-dcce5f05b41a_9bd7916d-a340-4925-a911-92390cbe0f33.json'),
    host?: string(name='Host', example='https://cloudagentbot-online.oss-cn-hangzhou.aliyuncs.com'),
    policy?: string(name='Policy', example='eyJleHBpcmF0aW9uIjoiMjAyNS0wMy0xM1QwODo0NToyNy4zMzFaIiwiY29uZGl0aW9ucyI6W1siY29udGVudC1sZW5ndGgtcmFuZ2UiLDAsNTI0Mjg4MDBdLFsic3RhcnRzLXdpdGgiLCIka2V5IiwiVVBMT0FERUQvU0NSSVBULzEzNmEwNTVlLTNkMDctNDZjNi04NTNhLTczMWIzYTI5NzNkZS8iXV19'),
    signature?: string(name='Signature', example='MD4CHQCiECtjdsP+fstJDcqsPt+GbWxSWPzGQxeQiblzAh0AuidaKc5JY5AkHFIE+qiQI3izJQQbpUoG0paPTw=='),
  }(name='UploadParams'),
}

model GetJobDataUploadParamsResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: GetJobDataUploadParamsResponseBody(name='body'),
}

/**
 * @param request GetJobDataUploadParamsRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return GetJobDataUploadParamsResponse
 */
async function getJobDataUploadParamsWithOptions(request: GetJobDataUploadParamsRequest, runtime: Util.RuntimeOptions): GetJobDataUploadParamsResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.busiType)) {
    query['BusiType'] = request.busiType;
  }
  if (!Util.isUnset(request.fileName)) {
    query['FileName'] = request.fileName;
  }
  if (!Util.isUnset(request.instanceId)) {
    query['InstanceId'] = request.instanceId;
  }
  if (!Util.isUnset(request.path)) {
    query['Path'] = request.path;
  }
  if (!Util.isUnset(request.uniqueId)) {
    query['UniqueId'] = request.uniqueId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'GetJobDataUploadParams',
    version = '2019-12-26',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @param request GetJobDataUploadParamsRequest
 * @return GetJobDataUploadParamsResponse
 */
async function getJobDataUploadParams(request: GetJobDataUploadParamsRequest): GetJobDataUploadParamsResponse {
  var runtime = new Util.RuntimeOptions{};
  return getJobDataUploadParamsWithOptions(request, runtime);
}

model GetMaxAttemptsPerDayRequest {
  entryId?: string(name='EntryId', description='This parameter is required.', example='2bfa5ae4-7185-4227-a3b8-328f26f11be1'),
  strategyLevel?: int32(name='StrategyLevel', example='2'),
}

model GetMaxAttemptsPerDayResponseBody = {
  code?: string(name='Code', example='OK'),
  httpStatusCode?: int32(name='HttpStatusCode', example='200'),
  maxAttemptsPerDay?: int32(name='MaxAttemptsPerDay', example='2'),
  message?: string(name='Message', example='Success'),
  requestId?: string(name='RequestId', example='254EB995-DEDF-48A4-9101-9CA5B72FFBCC'),
  success?: boolean(name='Success', example='true'),
}

model GetMaxAttemptsPerDayResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: GetMaxAttemptsPerDayResponseBody(name='body'),
}

/**
 * @param request GetMaxAttemptsPerDayRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return GetMaxAttemptsPerDayResponse
 */
async function getMaxAttemptsPerDayWithOptions(request: GetMaxAttemptsPerDayRequest, runtime: Util.RuntimeOptions): GetMaxAttemptsPerDayResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.entryId)) {
    query['EntryId'] = request.entryId;
  }
  if (!Util.isUnset(request.strategyLevel)) {
    query['StrategyLevel'] = request.strategyLevel;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'GetMaxAttemptsPerDay',
    version = '2019-12-26',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @param request GetMaxAttemptsPerDayRequest
 * @return GetMaxAttemptsPerDayResponse
 */
async function getMaxAttemptsPerDay(request: GetMaxAttemptsPerDayRequest): GetMaxAttemptsPerDayResponse {
  var runtime = new Util.RuntimeOptions{};
  return getMaxAttemptsPerDayWithOptions(request, runtime);
}

model GetNumberDistrictInfoTemplateDownloadUrlResponseBody = {
  code?: string(name='Code', example='OK'),
  fileHttpUrl?: string(name='FileHttpUrl', example='http://xxx.xx.com/xx'),
  httpStatusCode?: int32(name='HttpStatusCode', example='200'),
  message?: string(name='Message', example='Success'),
  requestId?: string(name='RequestId', example='254EB995-DEDF-48A4-9101-9CA5B72FFBCC'),
  success?: boolean(name='Success', example='true'),
}

model GetNumberDistrictInfoTemplateDownloadUrlResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: GetNumberDistrictInfoTemplateDownloadUrlResponseBody(name='body'),
}

/**
 * @summary 获取号码库模板下载链接
 *
 * @param request GetNumberDistrictInfoTemplateDownloadUrlRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return GetNumberDistrictInfoTemplateDownloadUrlResponse
 */
async function getNumberDistrictInfoTemplateDownloadUrlWithOptions(runtime: Util.RuntimeOptions): GetNumberDistrictInfoTemplateDownloadUrlResponse {
  var req = new OpenApi.OpenApiRequest{};
  var params = new OpenApi.Params{
    action = 'GetNumberDistrictInfoTemplateDownloadUrl',
    version = '2019-12-26',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 获取号码库模板下载链接
 *
 * @return GetNumberDistrictInfoTemplateDownloadUrlResponse
 */
async function getNumberDistrictInfoTemplateDownloadUrl(): GetNumberDistrictInfoTemplateDownloadUrlResponse {
  var runtime = new Util.RuntimeOptions{};
  return getNumberDistrictInfoTemplateDownloadUrlWithOptions(runtime);
}

model GetRealtimeConcurrencyReportRequest {
  instanceId?: string(name='InstanceId', example='85bf7efa-a07c-498a-850e-99a5849b8589'),
  jobGroupId?: string(name='JobGroupId', example='c62e6789-28a8-41db-941e-171a01d3b3b9'),
  pageNumber?: int32(name='PageNumber', example='1'),
  pageSize?: int32(name='PageSize', example='10'),
}

model GetRealtimeConcurrencyReportResponseBody = {
  code?: string(name='Code', example='OK'),
  httpStatusCode?: int32(name='HttpStatusCode', example='200'),
  message?: string(name='Message', example='Success'),
  reportDate?: long(name='ReportDate', example='1743474900488'),
  reports?: {
    list?: [ 
      {
        instanceId?: string(name='InstanceId', example='85bf7efa-a07c-498a-850e-99a5849b8589'),
        instanceName?: string(name='InstanceName'),
        jobGroupId?: string(name='JobGroupId', example='c62e6789-28a8-41db-941e-171a01d3b3b9'),
        jobGroupName?: string(name='JobGroupName'),
        maxConcurrencyLimit?: long(name='MaxConcurrencyLimit', example='2'),
        minConcurrencyLimit?: long(name='MinConcurrencyLimit', example='0'),
        occupiedConcurrencyCount?: long(name='OccupiedConcurrencyCount', example='1'),
        reportDate?: long(name='ReportDate', example='1743474900488'),
      }
    ](name='List'),
    pageNumber?: int32(name='PageNumber', example='2'),
    pageSize?: int32(name='PageSize', example='10'),
    totalCount?: int32(name='TotalCount', example='16'),
  }(name='Reports'),
  requestId?: string(name='RequestId', example='254EB995-DEDF-48A4-9101-9CA5B72FFBCC'),
  success?: boolean(name='Success', example='true'),
}

model GetRealtimeConcurrencyReportResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: GetRealtimeConcurrencyReportResponseBody(name='body'),
}

/**
 * @summary GetRealtimeConcurrencyReport
 *
 * @param request GetRealtimeConcurrencyReportRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return GetRealtimeConcurrencyReportResponse
 */
async function getRealtimeConcurrencyReportWithOptions(request: GetRealtimeConcurrencyReportRequest, runtime: Util.RuntimeOptions): GetRealtimeConcurrencyReportResponse {
  Util.validateModel(request);
  var query = OpenApiUtil.query(Util.toMap(request));
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'GetRealtimeConcurrencyReport',
    version = '2019-12-26',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'GET',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary GetRealtimeConcurrencyReport
 *
 * @param request GetRealtimeConcurrencyReportRequest
 * @return GetRealtimeConcurrencyReportResponse
 */
async function getRealtimeConcurrencyReport(request: GetRealtimeConcurrencyReportRequest): GetRealtimeConcurrencyReportResponse {
  var runtime = new Util.RuntimeOptions{};
  return getRealtimeConcurrencyReportWithOptions(request, runtime);
}

model GetSummaryInfoRequest {
  instanceIdList?: [ string ](name='InstanceIdList', example='[]'),
}

model GetSummaryInfoResponseBody = {
  agentBotInstanceSummaryList?: [ 
    {
      instanceId?: string(name='InstanceId', example='254EB995-DEDF-48A4-9101-9CA5B72FFBCC'),
      totalCallCount?: long(name='TotalCallCount', example='12'),
      totalCallTime?: long(name='TotalCallTime', example='10'),
      usedRecordingStorageSpace?: int32(name='UsedRecordingStorageSpace', example='10'),
    }
  ](name='AgentBotInstanceSummaryList', example='[]'),
  code?: string(name='Code', example='OK'),
  httpStatusCode?: int32(name='HttpStatusCode', example='200'),
  message?: string(name='Message', example='Success'),
  requestId?: string(name='RequestId', example='254EB995-DEDF-48A4-9101-9CA5B72FFBCC'),
  success?: boolean(name='Success', example='true'),
}

model GetSummaryInfoResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: GetSummaryInfoResponseBody(name='body'),
}

/**
 * @param request GetSummaryInfoRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return GetSummaryInfoResponse
 */
async function getSummaryInfoWithOptions(request: GetSummaryInfoRequest, runtime: Util.RuntimeOptions): GetSummaryInfoResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.instanceIdList)) {
    query['InstanceIdList'] = request.instanceIdList;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'GetSummaryInfo',
    version = '2019-12-26',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @param request GetSummaryInfoRequest
 * @return GetSummaryInfoResponse
 */
async function getSummaryInfo(request: GetSummaryInfoRequest): GetSummaryInfoResponse {
  var runtime = new Util.RuntimeOptions{};
  return getSummaryInfoWithOptions(request, runtime);
}

model GetTaskByUuidRequest {
  instanceId?: string(name='InstanceId', description='This parameter is required.', example='024f8cf0-c842-4c01-b74b-c8667e4579c7'),
  taskId?: string(name='TaskId', description='This parameter is required.', example='15160071061'),
  withConversations?: boolean(name='WithConversations', example='true'),
}

model GetTaskByUuidResponseBody = {
  code?: string(name='Code'),
  httpStatusCode?: int32(name='HttpStatusCode'),
  message?: string(name='Message'),
  requestId?: string(name='RequestId', example='254EB995-DEDF-48A4-9101-9CA5B72FFBCC'),
  success?: boolean(name='Success'),
  task?: {
    actualTime?: long(name='ActualTime', example='1640090211434'),
    callId?: string(name='CallId', example='254EB995-DEDF-48A4-9101-9CA5B72FFBCC'),
    calledNumber?: string(name='CalledNumber', example='13777777777'),
    callingNumber?: string(name='CallingNumber', example='057190294'),
    conversations?: [ 
      {
        action?: string(name='Action'),
        script?: string(name='Script'),
        sequenceId?: string(name='SequenceId'),
        speaker?: string(name='Speaker'),
        timestamp?: long(name='Timestamp'),
      }
    ](name='Conversations'),
    endReason?: int32(name='EndReason', example='1640090211434'),
    endTime?: long(name='EndTime', example='1640090211434'),
    id?: string(name='Id', example='2'),
    instanceId?: string(name='InstanceId', example='254EB995-DEDF-48A4-9101-9CA5B72FFBCC'),
    jobGroupId?: string(name='JobGroupId', example='254EB995-DEDF-48A4-9101-9CA5B72FFBCC'),
    jobId?: string(name='JobId', example='254EB995-DEDF-48A4-9101-9CA5B72FFBCC'),
    plannedTime?: long(name='PlannedTime', example='1640090211434'),
  }(name='Task', example='{}'),
}

model GetTaskByUuidResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: GetTaskByUuidResponseBody(name='body'),
}

/**
 * @param request GetTaskByUuidRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return GetTaskByUuidResponse
 */
async function getTaskByUuidWithOptions(request: GetTaskByUuidRequest, runtime: Util.RuntimeOptions): GetTaskByUuidResponse {
  Util.validateModel(request);
  var query = OpenApiUtil.query(Util.toMap(request));
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'GetTaskByUuid',
    version = '2019-12-26',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'GET',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @param request GetTaskByUuidRequest
 * @return GetTaskByUuidResponse
 */
async function getTaskByUuid(request: GetTaskByUuidRequest): GetTaskByUuidResponse {
  var runtime = new Util.RuntimeOptions{};
  return getTaskByUuidWithOptions(request, runtime);
}

model GetVersionResponseBody = {
  code?: string(name='Code', example='OK'),
  httpStatusCode?: int32(name='HttpStatusCode', example='200'),
  message?: string(name='Message', example='Success'),
  requestId?: string(name='RequestId', example='1364f208-982d-4d0c-89aa-d56e22b47589'),
  success?: boolean(name='Success', example='true'),
  version?: string(name='Version', example='2018-12-13'),
}

model GetVersionResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: GetVersionResponseBody(name='body'),
}

/**
 * @param request GetVersionRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return GetVersionResponse
 */
async function getVersionWithOptions(runtime: Util.RuntimeOptions): GetVersionResponse {
  var req = new OpenApi.OpenApiRequest{};
  var params = new OpenApi.Params{
    action = 'GetVersion',
    version = '2019-12-26',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @return GetVersionResponse
 */
async function getVersion(): GetVersionResponse {
  var runtime = new Util.RuntimeOptions{};
  return getVersionWithOptions(runtime);
}

model ImportScriptRequest {
  instanceId?: string(name='InstanceId', description='This parameter is required.'),
  nluEngine?: string(name='NluEngine'),
  signatureUrl?: string(name='SignatureUrl', description='This parameter is required.'),
}

model ImportScriptResponseBody = {
  code?: string(name='Code'),
  httpStatusCode?: int32(name='HttpStatusCode'),
  message?: string(name='Message'),
  requestId?: string(name='RequestId'),
  scriptId?: string(name='ScriptId'),
  success?: boolean(name='Success'),
}

model ImportScriptResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: ImportScriptResponseBody(name='body'),
}

/**
 * @param request ImportScriptRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return ImportScriptResponse
 */
async function importScriptWithOptions(request: ImportScriptRequest, runtime: Util.RuntimeOptions): ImportScriptResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.instanceId)) {
    query['InstanceId'] = request.instanceId;
  }
  if (!Util.isUnset(request.nluEngine)) {
    query['NluEngine'] = request.nluEngine;
  }
  if (!Util.isUnset(request.signatureUrl)) {
    query['SignatureUrl'] = request.signatureUrl;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'ImportScript',
    version = '2019-12-26',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @param request ImportScriptRequest
 * @return ImportScriptResponse
 */
async function importScript(request: ImportScriptRequest): ImportScriptResponse {
  var runtime = new Util.RuntimeOptions{};
  return importScriptWithOptions(request, runtime);
}

model InflightTaskTimeoutRequest {
  instanceId?: string(name='InstanceId', description='This parameter is required.', example='2d350e38-f561-49b0-85d3-b90d9fc7e052'),
  instanceOwnerId?: long(name='InstanceOwnerId', example='1864632921948620'),
  taskId?: string(name='TaskId', description='This parameter is required.', example='6bc0585c-0a8a-46d8-b042-23570bbb4855'),
}

model InflightTaskTimeoutResponseBody = {
  code?: string(name='Code', example='OK'),
  httpStatusCode?: int32(name='HttpStatusCode', example='200'),
  message?: string(name='Message', example='Success'),
  requestId?: string(name='RequestId', example='254EB995-DEDF-48A4-9101-9CA5B72FFBCC'),
  success?: boolean(name='Success', example='true'),
}

model InflightTaskTimeoutResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: InflightTaskTimeoutResponseBody(name='body'),
}

/**
 * @summary InflightTaskTimeout
 *
 * @param request InflightTaskTimeoutRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return InflightTaskTimeoutResponse
 */
async function inflightTaskTimeoutWithOptions(request: InflightTaskTimeoutRequest, runtime: Util.RuntimeOptions): InflightTaskTimeoutResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.instanceId)) {
    query['InstanceId'] = request.instanceId;
  }
  if (!Util.isUnset(request.instanceOwnerId)) {
    query['InstanceOwnerId'] = request.instanceOwnerId;
  }
  if (!Util.isUnset(request.taskId)) {
    query['TaskId'] = request.taskId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'InflightTaskTimeout',
    version = '2019-12-26',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary InflightTaskTimeout
 *
 * @param request InflightTaskTimeoutRequest
 * @return InflightTaskTimeoutResponse
 */
async function inflightTaskTimeout(request: InflightTaskTimeoutRequest): InflightTaskTimeoutResponse {
  var runtime = new Util.RuntimeOptions{};
  return inflightTaskTimeoutWithOptions(request, runtime);
}

model ListAgentProfilesRequest {
  appIp?: string(name='AppIp', example='127.0.0.1'),
  instanceId?: string(name='InstanceId', description='This parameter is required.', example='af81a389-91f0-4157-8d82-720edd02b66a'),
  scriptId?: string(name='ScriptId', example='d004cfd2-6a81-491c-83c6-cbe186620c95'),
}

model ListAgentProfilesResponseBody = {
  code?: string(name='Code', example='OK'),
  data?: [ 
    {
      agentProfileId?: string(name='AgentProfileId', example='37ca3ca1ac4b4e57adf3da5b5d939d04'),
      agentProfileTemplateId?: string(name='AgentProfileTemplateId', example='default-survey'),
      agentType?: string(name='AgentType', description='agent type', example='“”'),
      createTime?: string(name='CreateTime', example='1721701525327'),
      description?: string(name='Description'),
      instanceId?: string(name='InstanceId', example='e49ad122-15a1-443a-a102-84a78a93be79'),
      instructionJson?: string(name='InstructionJson', example='[{"type":"TransferToAgent","instructions":[{"code":"Transfer0","skillGroupId":"123","skillGroupName":"123"}],"timeoutEnable":false},{"type":"CollectNumber","instructions":[]}]'),
      labelsJson?: string(name='LabelsJson'),
      model?: string(name='Model', example='model_002'),
      modelConfig?: string(name='ModelConfig', example='{}'),
      prompt?: string(name='Prompt', example='“”'),
      promptJson?: string(name='PromptJson'),
      scenario?: string(name='Scenario'),
      scriptId?: string(name='ScriptId', example='43972417-0657-452a-81c2-c59d8245a9b2'),
      system?: boolean(name='System', example='false'),
      updateTime?: string(name='UpdateTime', example='1721701525327'),
      variablesJson?: string(name='VariablesJson'),
    }
  ](name='Data'),
  httpStatusCode?: int32(name='HttpStatusCode', example='200'),
  message?: string(name='Message', example='Success'),
  requestId?: string(name='RequestId', example='254EB995-DEDF-48A4-9101-9CA5B72FFBCC'),
  success?: boolean(name='Success', example='true'),
}

model ListAgentProfilesResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: ListAgentProfilesResponseBody(name='body'),
}

/**
 * @param request ListAgentProfilesRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return ListAgentProfilesResponse
 */
async function listAgentProfilesWithOptions(request: ListAgentProfilesRequest, runtime: Util.RuntimeOptions): ListAgentProfilesResponse {
  Util.validateModel(request);
  var body : map[string]any = {};
  if (!Util.isUnset(request.appIp)) {
    body['AppIp'] = request.appIp;
  }
  if (!Util.isUnset(request.instanceId)) {
    body['InstanceId'] = request.instanceId;
  }
  if (!Util.isUnset(request.scriptId)) {
    body['ScriptId'] = request.scriptId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'ListAgentProfiles',
    version = '2019-12-26',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @param request ListAgentProfilesRequest
 * @return ListAgentProfilesResponse
 */
async function listAgentProfiles(request: ListAgentProfilesRequest): ListAgentProfilesResponse {
  var runtime = new Util.RuntimeOptions{};
  return listAgentProfilesWithOptions(request, runtime);
}

model ListAllTenantBindNumberBindingResponseBody = {
  code?: string(name='Code', example='OK'),
  data?: {
    list?: [ 
      {
        billingType?: string(name='BillingType'),
        bindingId?: string(name='BindingId', example='b5bfb844-ce85-4779-bc8f-161fba46aa07'),
        instanceNameList?: [ string ](name='InstanceNameList'),
        number?: string(name='Number', example='15005059355'),
        serializedParams?: string(name='SerializedParams', example='{\\\\"rateLimitPeriod\\\\":\\\\"1\\\\",\\\\"rateLimitCount\\\\":\\\\"1\\\\"}'),
        trunkName?: string(name='TrunkName'),
      }
    ](name='List'),
  }(name='Data'),
  httpStatusCode?: int32(name='HttpStatusCode', example='200'),
  message?: string(name='Message', example='Success'),
  requestId?: string(name='RequestId', example='A4BEAB4B-C810-5386-B72A-1A35FF1E6B15'),
  success?: boolean(name='Success', example='True'),
}

model ListAllTenantBindNumberBindingResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: ListAllTenantBindNumberBindingResponseBody(name='body'),
}

/**
 * @summary 租户绑定号码列表
 *
 * @param request ListAllTenantBindNumberBindingRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return ListAllTenantBindNumberBindingResponse
 */
async function listAllTenantBindNumberBindingWithOptions(runtime: Util.RuntimeOptions): ListAllTenantBindNumberBindingResponse {
  var req = new OpenApi.OpenApiRequest{};
  var params = new OpenApi.Params{
    action = 'ListAllTenantBindNumberBinding',
    version = '2019-12-26',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 租户绑定号码列表
 *
 * @return ListAllTenantBindNumberBindingResponse
 */
async function listAllTenantBindNumberBinding(): ListAllTenantBindNumberBindingResponse {
  var runtime = new Util.RuntimeOptions{};
  return listAllTenantBindNumberBindingWithOptions(runtime);
}

model ListAnnotationMissionRequest {
  annotationMissionId?: string(name='AnnotationMissionId', example='0943abcb-bd7d-4ace-8cf7-97d39d4dd0b9'),
  annotationMissionName?: string(name='AnnotationMissionName'),
  annotationStatusListFilter?: [ int32 ](name='AnnotationStatusListFilter'),
  annotationStatusListStringFilter?: string(name='AnnotationStatusListStringFilter', example='[1]'),
  createTimeEndFilter?: long(name='CreateTimeEndFilter', example='1673280000000'),
  createTimeStartFilter?: long(name='CreateTimeStartFilter', example='1661961600000'),
  instanceId?: string(name='InstanceId', example='191ef468-75a2-4004-9441-a5c31bf5cd9d'),
  pageIndex?: int32(name='PageIndex', example='1'),
  pageSize?: int32(name='PageSize', example='10'),
}

model ListAnnotationMissionResponseBody = {
  code?: string(name='Code', example='OK'),
  data?: {
    annotationMissionList?: [ 
      {
        annotationMissionDataSourceType?: int32(name='AnnotationMissionDataSourceType', example='1'),
        annotationMissionDebugDataSourceList?: [ int32 ](name='AnnotationMissionDebugDataSourceList'),
        annotationMissionId?: string(name='AnnotationMissionId', example='ddce607f-f537-4ebd-9914-cf45671defb9'),
        annotationMissionName?: string(name='AnnotationMissionName'),
        annotationStatus?: int32(name='AnnotationStatus', example='1'),
        conversationTimeEndFilter?: long(name='ConversationTimeEndFilter', example='1684511999000'),
        conversationTimeStartFilter?: long(name='ConversationTimeStartFilter', example='1683216000000'),
        createTime?: long(name='CreateTime', example='1676170339515'),
        excludeOtherMissionSession?: boolean(name='ExcludeOtherMissionSession', example='false'),
        finishTime?: long(name='FinishTime', example='1683443903785'),
        instanceId?: string(name='InstanceId', example='32be9d94-1346-4c4a-a4d0-ccd379f87013'),
        samplingCount?: int32(name='SamplingCount', example='1'),
        samplingDescription?: string(name='SamplingDescription'),
        samplingRate?: int32(name='SamplingRate', example='1'),
        samplingType?: int32(name='SamplingType', example='1'),
        sessionEndReasonFilterList?: [ int32 ](name='SessionEndReasonFilterList'),
        sessionFinishCount?: int32(name='SessionFinishCount', example='1'),
        sessionTotalCount?: int32(name='SessionTotalCount', example='1'),
      }
    ](name='AnnotationMissionList'),
    message?: string(name='Message', example='CDR \\\\"job-c7b8a817-b8e8-40f3-b7ad-f28dcea218ff\\\\" doesn\\\\"t exists.'),
    pageIndex?: long(name='PageIndex', example='1'),
    pageSize?: long(name='PageSize', example='10'),
    success?: boolean(name='Success', example='true'),
    totalCount?: long(name='TotalCount', example='30'),
    totalPageCount?: long(name='TotalPageCount', example='4'),
  }(name='Data'),
  httpStatusCode?: int32(name='HttpStatusCode', example='200'),
  message?: string(name='Message', example='CDR \\\\"job-c7b8a817-b8e8-40f3-b7ad-f28dcea218ff\\\\" doesn\\\\"t exists.'),
  requestId?: string(name='RequestId', example='254EB995-DEDF-48A4-9101-9CA5B72FFBCC'),
  success?: boolean(name='Success', example='true'),
}

model ListAnnotationMissionResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: ListAnnotationMissionResponseBody(name='body'),
}

/**
 * @param request ListAnnotationMissionRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return ListAnnotationMissionResponse
 */
async function listAnnotationMissionWithOptions(request: ListAnnotationMissionRequest, runtime: Util.RuntimeOptions): ListAnnotationMissionResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.annotationMissionId)) {
    query['AnnotationMissionId'] = request.annotationMissionId;
  }
  if (!Util.isUnset(request.annotationMissionName)) {
    query['AnnotationMissionName'] = request.annotationMissionName;
  }
  if (!Util.isUnset(request.annotationStatusListFilter)) {
    query['AnnotationStatusListFilter'] = request.annotationStatusListFilter;
  }
  if (!Util.isUnset(request.annotationStatusListStringFilter)) {
    query['AnnotationStatusListStringFilter'] = request.annotationStatusListStringFilter;
  }
  if (!Util.isUnset(request.createTimeEndFilter)) {
    query['CreateTimeEndFilter'] = request.createTimeEndFilter;
  }
  if (!Util.isUnset(request.createTimeStartFilter)) {
    query['CreateTimeStartFilter'] = request.createTimeStartFilter;
  }
  if (!Util.isUnset(request.instanceId)) {
    query['InstanceId'] = request.instanceId;
  }
  if (!Util.isUnset(request.pageIndex)) {
    query['PageIndex'] = request.pageIndex;
  }
  if (!Util.isUnset(request.pageSize)) {
    query['PageSize'] = request.pageSize;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'ListAnnotationMission',
    version = '2019-12-26',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @param request ListAnnotationMissionRequest
 * @return ListAnnotationMissionResponse
 */
async function listAnnotationMission(request: ListAnnotationMissionRequest): ListAnnotationMissionResponse {
  var runtime = new Util.RuntimeOptions{};
  return listAnnotationMissionWithOptions(request, runtime);
}

model ListAnnotationMissionSessionRequest {
  annotationMissionId?: string(name='AnnotationMissionId', example='8434a4b0-41fc-41b1-aa75-bbd1f2ab0c8d'),
  annotationMissionSessionId?: string(name='AnnotationMissionSessionId', example='8434a4b0-41fc-41b1-aa75-bbd1f2ab0c8d'),
  environment?: int32(name='Environment', example='0'),
  includeStatusListJsonString?: string(name='IncludeStatusListJsonString', example='[1]'),
  pageIndex?: int32(name='PageIndex', example='3'),
  pageSize?: int32(name='PageSize', example='1'),
}

model ListAnnotationMissionSessionResponseBody = {
  code?: string(name='Code', example='OK'),
  data?: {
    annotationMissionId?: string(name='AnnotationMissionId', example='b3f2c931-5180-43ca-b4aa-2baee2d73c8b'),
    annotationMissionSessionList?: [ 
      {
        annotationMissionChatList?: [ 
          {
            annotationAsrResult?: string(name='AnnotationAsrResult'),
            annotationMissionChatCustomizationDataInfoList?: [ 
              {
                annotationMissionChatCustomizationDataInfoId?: string(name='AnnotationMissionChatCustomizationDataInfoId', description='id'),
                annotationMissionChatId?: string(name='AnnotationMissionChatId', description='chat id'),
                annotationMissionId?: string(name='AnnotationMissionId', example='2f03b24a-fda2-4501-90ba-0a9a59f8dd9d'),
                annotationMissionSessionId?: string(name='AnnotationMissionSessionId'),
                content?: string(name='Content'),
                create?: boolean(name='Create', example='true'),
                createTime?: long(name='CreateTime', example='1682216045619'),
                customizationDataDescription?: string(name='CustomizationDataDescription'),
                customizationDataId?: string(name='CustomizationDataId', description='id'),
                customizationDataName?: string(name='CustomizationDataName'),
                customizationDataWeight?: int32(name='CustomizationDataWeight'),
                delete?: boolean(name='Delete', example='true'),
                instanceId?: string(name='InstanceId', example='d3fbfca8-4208-4d4b-a53a-c4dba5e43a66'),
                modifiedTime?: long(name='ModifiedTime', example='1679552585384'),
              }
            ](name='AnnotationMissionChatCustomizationDataInfoList'),
            annotationMissionChatId?: string(name='AnnotationMissionChatId', description='chat id', example='40669e52-c1c8-487f-9593-29749086bdc9'),
            annotationMissionChatIntentUserSayInfoList?: [ 
              {
                annotationMissionChatId?: string(name='AnnotationMissionChatId', description='chat id', example='77343553-cbc2-4487-a35c-869f1e86c573'),
                annotationMissionChatIntentUserSayInfoId?: string(name='AnnotationMissionChatIntentUserSayInfoId', description='id'),
                annotationMissionId?: string(name='AnnotationMissionId', example='77343553-cbc2-4487-a35c-869f1e86c573'),
                annotationMissionSessionId?: string(name='AnnotationMissionSessionId', example='77343553-cbc2-4487-a35c-869f1e86c573'),
                botId?: string(name='BotId', example='77343553-cbc2-4487-a35c-869f1e86c573'),
                content?: string(name='Content'),
                create?: boolean(name='Create', example='false'),
                createTime?: long(name='CreateTime', example='1682216045619'),
                delete?: boolean(name='Delete', example='true'),
                dialogId?: long(name='DialogId', example='77343553-cbc2-4487-a35c-869f1e86c573'),
                instanceId?: string(name='InstanceId', example='77343553-cbc2-4487-a35c-869f1e86c573'),
                intentId?: long(name='IntentId', example='77343553-cbc2-4487-a35c-869f1e86c573'),
                modifiedTime?: long(name='ModifiedTime', example='1682216045619'),
              }
            ](name='AnnotationMissionChatIntentUserSayInfoList'),
            annotationMissionChatTagInfoList?: [ 
              {
                annotationMissionChatId?: string(name='AnnotationMissionChatId', description='chat id'),
                annotationMissionChatTagInfoId?: string(name='AnnotationMissionChatTagInfoId', description='id'),
                annotationMissionId?: string(name='AnnotationMissionId', example='e7272cbb-a60d-4b41-b5c4-8863edc0b8f7'),
                annotationMissionSessionId?: string(name='AnnotationMissionSessionId'),
                annotationMissionTagInfoId?: string(name='AnnotationMissionTagInfoId', description='tag id'),
                annotationMissionTagInfoName?: string(name='AnnotationMissionTagInfoName'),
                create?: boolean(name='Create', example='true'),
                createTime?: long(name='CreateTime', example='1686797050000'),
                delete?: boolean(name='Delete', example='true'),
                instanceId?: string(name='InstanceId', example='32be9d94-1346-4c4a-a4d0-ccd379f87013'),
                modifiedTime?: long(name='ModifiedTime', example='1679019660000'),
              }
            ](name='AnnotationMissionChatTagInfoList'),
            annotationMissionChatVocabularyInfoList?: [ 
              {
                annotationMissionChatId?: string(name='AnnotationMissionChatId', description='chat id', example='77343553-cbc2-4487-a35c-869f1e86c573'),
                annotationMissionChatVocabularyInfoId?: string(name='AnnotationMissionChatVocabularyInfoId', description='id'),
                annotationMissionId?: string(name='AnnotationMissionId', example='b3f2c931-5180-43ca-b4aa-2baee2d73c8b'),
                annotationMissionSessionId?: string(name='AnnotationMissionSessionId', example='77343553-cbc2-4487-a35c-869f1e86c573'),
                create?: boolean(name='Create', example='true'),
                createTime?: long(name='CreateTime', example='1675218421941'),
                delete?: boolean(name='Delete', example='true'),
                instanceId?: string(name='InstanceId', example='818961ce-d9ba-4f88-89ca-2a04b24bdf01'),
                modifiedTime?: long(name='ModifiedTime', example='1676272557653'),
                vocabulary?: string(name='Vocabulary'),
                vocabularyDescription?: string(name='VocabularyDescription'),
                vocabularyId?: string(name='VocabularyId', example='77343553-cbc2-4487-a35c-869f1e86c573'),
                vocabularyName?: string(name='VocabularyName'),
                vocabularyWeight?: int32(name='VocabularyWeight'),
              }
            ](name='AnnotationMissionChatVocabularyInfoList'),
            annotationMissionId?: string(name='AnnotationMissionId', example='03f56192-fa8a-40dc-9558-39b357f0618f'),
            annotationMissionSessionId?: string(name='AnnotationMissionSessionId'),
            annotationStatus?: int32(name='AnnotationStatus', example='1'),
            answer?: string(name='Answer', example='{\\\\"Answer\\\\": u\\\\"\\\\u53c2\\\\u8003\\\\u6587\\\\u6863\\\\uff1ahttps://help.aliyun.com/document_detail/215402.html\\\\", \\\\"QuestionId\\\\": 371159, \\\\"Uuid\\\\": \\\\"ac14000116781568127896224d0044\\\\"}'),
            asrAnnotationStatus?: int32(name='AsrAnnotationStatus'),
            createTime?: long(name='CreateTime', example='1682216045619'),
            instanceId?: string(name='InstanceId', example='77343553-cbc2-4487-a35c-869f1e86c573'),
            intentAnnotationStatus?: int32(name='IntentAnnotationStatus'),
            modifiedTime?: long(name='ModifiedTime', example='1571649300000'),
            occurTime?: long(name='OccurTime', example='1682390676403'),
            originalAsrResult?: string(name='OriginalAsrResult'),
            sequenceId?: string(name='SequenceId', example='380578077'),
            subStatus?: int32(name='SubStatus'),
            tagAnnotationStatus?: int32(name='TagAnnotationStatus'),
            translationError?: int32(name='TranslationError', example='1'),
          }
        ](name='AnnotationMissionChatList'),
        annotationMissionId?: string(name='AnnotationMissionId', example='64ba5ac9-a4e1-4333-b03c-9d4a588c9f6c'),
        annotationMissionSessionId?: string(name='AnnotationMissionSessionId', description='ID', example='64ba5ac9-a4e1-4333-b03c-9d4a588c9f6c'),
        annotationStatus?: int32(name='AnnotationStatus', example='1'),
        createTime?: long(name='CreateTime', example='1691117009000'),
        debugConversation?: boolean(name='DebugConversation', example='true'),
        instanceId?: string(name='InstanceId', example='a4274627-265f-4e14-b2d6-4ee7d4f8593e'),
        jobGroupId?: string(name='JobGroupId', example='2f642da1-b00b-4dd6-ac7d-dcbeefd13ff3'),
        jobId?: string(name='JobId', example='42da7cde-a5e8-45cc-b9d2-828711d95b30'),
        modifiedTime?: long(name='ModifiedTime', example='1677987898384'),
        scriptId?: string(name='ScriptId', example='408d6c4d-23e2-41f6-bbdd-f919a8297aa4'),
        sessionId?: string(name='SessionId', example='40669e52-c1c8-487f-9593-29749086bdc9'),
        version?: int32(name='Version', example='1'),
      }
    ](name='AnnotationMissionSessionList'),
    message?: string(name='Message', example='bp.java.nopowerContact'),
    success?: boolean(name='Success', example='true'),
    totalCount?: long(name='TotalCount', example='30'),
  }(name='Data'),
  httpStatusCode?: int32(name='HttpStatusCode', example='200'),
  message?: string(name='Message', example='bp.java.nopowerContact'),
  requestId?: string(name='RequestId', example='254EB995-DEDF-48A4-9101-9CA5B72FFBCC'),
  success?: boolean(name='Success', example='true'),
}

model ListAnnotationMissionSessionResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: ListAnnotationMissionSessionResponseBody(name='body'),
}

/**
 * @param request ListAnnotationMissionSessionRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return ListAnnotationMissionSessionResponse
 */
async function listAnnotationMissionSessionWithOptions(request: ListAnnotationMissionSessionRequest, runtime: Util.RuntimeOptions): ListAnnotationMissionSessionResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.annotationMissionId)) {
    query['AnnotationMissionId'] = request.annotationMissionId;
  }
  if (!Util.isUnset(request.annotationMissionSessionId)) {
    query['AnnotationMissionSessionId'] = request.annotationMissionSessionId;
  }
  if (!Util.isUnset(request.environment)) {
    query['Environment'] = request.environment;
  }
  if (!Util.isUnset(request.includeStatusListJsonString)) {
    query['IncludeStatusListJsonString'] = request.includeStatusListJsonString;
  }
  if (!Util.isUnset(request.pageIndex)) {
    query['PageIndex'] = request.pageIndex;
  }
  if (!Util.isUnset(request.pageSize)) {
    query['PageSize'] = request.pageSize;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'ListAnnotationMissionSession',
    version = '2019-12-26',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @param request ListAnnotationMissionSessionRequest
 * @return ListAnnotationMissionSessionResponse
 */
async function listAnnotationMissionSession(request: ListAnnotationMissionSessionRequest): ListAnnotationMissionSessionResponse {
  var runtime = new Util.RuntimeOptions{};
  return listAnnotationMissionSessionWithOptions(request, runtime);
}

model ListApiPluginsRequest {
  instanceId?: string(name='InstanceId', description='This parameter is required.', example='024f8cf0-c842-4c01-b74b-c8667e4579c7'),
  pageNumber?: int32(name='PageNumber', description='This parameter is required.', example='1'),
  pageSize?: int32(name='PageSize', description='This parameter is required.', example='10'),
  uuidsJson?: string(name='UuidsJson', example='["d17d5bfa-4972-4389-9718-f9602edabe48"]'),
}

model ListApiPluginsResponseBody = {
  apiPlugins?: [ 
    {
      description?: string(name='Description'),
      draftedConfigJson?: string(name='DraftedConfigJson'),
      gmtCreate?: long(name='GmtCreate', example='1666230851000'),
      gmtModified?: long(name='GmtModified', example='1641891940000'),
      instanceId?: string(name='InstanceId', example='7c0e5b5e-a839-4999-8301-2c7d07a1f16f'),
      name?: string(name='Name'),
      publishedConfigJson?: string(name='PublishedConfigJson'),
      status?: string(name='Status', example='Drafted'),
      type?: string(name='Type', example='Function'),
      uuid?: string(name='Uuid', example='e1a3c448-20cf-4586-8aa2-4cdca75f7c20'),
    }
  ](name='ApiPlugins'),
  code?: string(name='Code', example='OK'),
  httpStatusCode?: int32(name='HttpStatusCode', example='200'),
  message?: string(name='Message', example='Success'),
  pageNumber?: int32(name='PageNumber', example='1'),
  pageSize?: int32(name='PageSize', example='10'),
  requestId?: string(name='RequestId', example='254EB995-DEDF-48A4-9101-9CA5B72FFBCC'),
  success?: boolean(name='Success', example='true'),
  totalCount?: long(name='TotalCount', example='100'),
}

model ListApiPluginsResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: ListApiPluginsResponseBody(name='body'),
}

/**
 * @param request ListApiPluginsRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return ListApiPluginsResponse
 */
async function listApiPluginsWithOptions(request: ListApiPluginsRequest, runtime: Util.RuntimeOptions): ListApiPluginsResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.instanceId)) {
    query['InstanceId'] = request.instanceId;
  }
  if (!Util.isUnset(request.pageNumber)) {
    query['PageNumber'] = request.pageNumber;
  }
  if (!Util.isUnset(request.pageSize)) {
    query['PageSize'] = request.pageSize;
  }
  if (!Util.isUnset(request.uuidsJson)) {
    query['UuidsJson'] = request.uuidsJson;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'ListApiPlugins',
    version = '2019-12-26',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @param request ListApiPluginsRequest
 * @return ListApiPluginsResponse
 */
async function listApiPlugins(request: ListApiPluginsRequest): ListApiPluginsResponse {
  var runtime = new Util.RuntimeOptions{};
  return listApiPluginsWithOptions(request, runtime);
}

model ListBeebotIntentRequest {
  instanceId?: string(name='InstanceId', description='This parameter is required.', example='e5035654-1745-484a-8c5b-165f7c7bcd79'),
  intentName?: string(name='IntentName'),
  pageNumber?: int32(name='PageNumber', description='This parameter is required.', example='1'),
  pageSize?: int32(name='PageSize', description='This parameter is required.', example='10'),
  scriptId?: string(name='ScriptId', description='This parameter is required.', example='c5c5d8c0-c0f1-48a7-be2b-dc46006d888a'),
}

model ListBeebotIntentResponseBody = {
  beebotRequestId?: string(name='BeebotRequestId', example='497CFAFF-48CC-161A-AD2C-252DED569037'),
  code?: string(name='Code', example='OK'),
  httpStatusCode?: int32(name='HttpStatusCode', example='200'),
  intents?: [ 
    {
      aliasName?: string(name='AliasName'),
      createTime?: string(name='CreateTime', example='2025-04-21 16:03:15.+0800'),
      createUserId?: string(name='CreateUserId', example='1252504'),
      createUserName?: string(name='CreateUserName', example='xxx@voice-navigator-testonaliyun.com'),
      intentId?: long(name='IntentId', example='10717802'),
      intentName?: string(name='IntentName'),
      modifyTime?: string(name='ModifyTime', example='2025-04-21 16:03:15.+0800'),
      modifyUserId?: string(name='ModifyUserId', example='1252504'),
      modifyUserName?: string(name='ModifyUserName', example='xxx@voice-navigator-testonaliyun.com'),
    }
  ](name='Intents'),
  message?: string(name='Message', example='Success'),
  pageNumber?: int32(name='PageNumber', example='1'),
  pageSize?: int32(name='PageSize', example='10'),
  requestId?: string(name='RequestId', example='254EB995-DEDF-48A4-9101-9CA5B72FFBCC'),
  success?: boolean(name='Success', example='true'),
  totalCount?: int32(name='TotalCount', example='100'),
}

model ListBeebotIntentResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: ListBeebotIntentResponseBody(name='body'),
}

/**
 * @summary ListBeebotIntent
 *
 * @param request ListBeebotIntentRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return ListBeebotIntentResponse
 */
async function listBeebotIntentWithOptions(request: ListBeebotIntentRequest, runtime: Util.RuntimeOptions): ListBeebotIntentResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.instanceId)) {
    query['InstanceId'] = request.instanceId;
  }
  if (!Util.isUnset(request.intentName)) {
    query['IntentName'] = request.intentName;
  }
  if (!Util.isUnset(request.pageNumber)) {
    query['PageNumber'] = request.pageNumber;
  }
  if (!Util.isUnset(request.pageSize)) {
    query['PageSize'] = request.pageSize;
  }
  if (!Util.isUnset(request.scriptId)) {
    query['ScriptId'] = request.scriptId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'ListBeebotIntent',
    version = '2019-12-26',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary ListBeebotIntent
 *
 * @param request ListBeebotIntentRequest
 * @return ListBeebotIntentResponse
 */
async function listBeebotIntent(request: ListBeebotIntentRequest): ListBeebotIntentResponse {
  var runtime = new Util.RuntimeOptions{};
  return listBeebotIntentWithOptions(request, runtime);
}

model ListBeebotIntentLgfRequest {
  instanceId?: string(name='InstanceId', description='This parameter is required.', example='e5035654-1745-484a-8c5b-165f7c7bcd79'),
  intentId?: string(name='IntentId', description='This parameter is required.', example='10717802'),
  lgfText?: string(name='LgfText'),
  pageNumber?: int32(name='PageNumber', description='This parameter is required.', example='1'),
  pageSize?: int32(name='PageSize', description='This parameter is required.', example='10'),
  scriptId?: string(name='ScriptId', description='This parameter is required.', example='c5c5d8c0-c0f1-48a7-be2b-dc46006d888a'),
}

model ListBeebotIntentLgfResponseBody = {
  beebotRequestId?: string(name='BeebotRequestId', example='497CFAFF-48CC-161A-AD2C-252DED569037'),
  code?: string(name='Code', example='OK'),
  httpStatusCode?: int32(name='HttpStatusCode', example='200'),
  lgfs?: [ 
    {
      createTime?: string(name='CreateTime', example='2025-04-21 10:54:18.+0800'),
      intentId?: long(name='IntentId', example='10717802'),
      lgfId?: long(name='LgfId', example='5666117'),
      modifyTime?: string(name='ModifyTime', example='2025-04-21 10:54:18.+0800'),
      ruleText?: string(name='RuleText'),
    }
  ](name='Lgfs'),
  message?: string(name='Message', example='Success'),
  pageNumber?: int32(name='PageNumber', example='1'),
  pageSize?: int32(name='PageSize', example='10'),
  requestId?: string(name='RequestId', example='254EB995-DEDF-48A4-9101-9CA5B72FFBCC'),
  success?: boolean(name='Success', example='true'),
  totalCount?: int32(name='TotalCount', example='100'),
}

model ListBeebotIntentLgfResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: ListBeebotIntentLgfResponseBody(name='body'),
}

/**
 * @summary ListBeebotIntentLgf
 *
 * @param request ListBeebotIntentLgfRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return ListBeebotIntentLgfResponse
 */
async function listBeebotIntentLgfWithOptions(request: ListBeebotIntentLgfRequest, runtime: Util.RuntimeOptions): ListBeebotIntentLgfResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.instanceId)) {
    query['InstanceId'] = request.instanceId;
  }
  if (!Util.isUnset(request.intentId)) {
    query['IntentId'] = request.intentId;
  }
  if (!Util.isUnset(request.lgfText)) {
    query['LgfText'] = request.lgfText;
  }
  if (!Util.isUnset(request.pageNumber)) {
    query['PageNumber'] = request.pageNumber;
  }
  if (!Util.isUnset(request.pageSize)) {
    query['PageSize'] = request.pageSize;
  }
  if (!Util.isUnset(request.scriptId)) {
    query['ScriptId'] = request.scriptId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'ListBeebotIntentLgf',
    version = '2019-12-26',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary ListBeebotIntentLgf
 *
 * @param request ListBeebotIntentLgfRequest
 * @return ListBeebotIntentLgfResponse
 */
async function listBeebotIntentLgf(request: ListBeebotIntentLgfRequest): ListBeebotIntentLgfResponse {
  var runtime = new Util.RuntimeOptions{};
  return listBeebotIntentLgfWithOptions(request, runtime);
}

model ListBeebotIntentUserSayRequest {
  content?: string(name='Content'),
  instanceId?: string(name='InstanceId', description='This parameter is required.', example='e5035654-1745-484a-8c5b-165f7c7bcd79'),
  intentId?: string(name='IntentId', description='This parameter is required.', example='10717802'),
  pageNumber?: int32(name='PageNumber', description='This parameter is required.', example='1'),
  pageSize?: int32(name='PageSize', description='This parameter is required.', example='10'),
  scriptId?: string(name='ScriptId', description='This parameter is required.', example='c5c5d8c0-c0f1-48a7-be2b-dc46006d888a'),
}

model ListBeebotIntentUserSayResponseBody = {
  beebotRequestId?: string(name='BeebotRequestId', example='D7BBFCDF-59B0-1ADA-BCA3-4B77F642DDFB'),
  code?: string(name='Code', example='OK'),
  httpStatusCode?: int32(name='HttpStatusCode', example='200'),
  message?: string(name='Message', example='Success'),
  pageNumber?: int32(name='PageNumber', example='1'),
  pageSize?: int32(name='PageSize', example='10'),
  requestId?: string(name='RequestId', example='0956D5DA-0978-5DC9-94B0-C68527DA7475'),
  success?: boolean(name='Success', example='true'),
  totalCount?: int32(name='TotalCount', example='100'),
  userSays?: [ 
    {
      content?: string(name='Content'),
      createTime?: string(name='CreateTime', example='2025-04-21 14:16:05.+0800'),
      intentId?: long(name='IntentId', example='10717802'),
      modifyTime?: string(name='ModifyTime', example='2025-04-21 14:16:05.+0800'),
      userSayId?: string(name='UserSayId', example='17448458'),
    }
  ](name='UserSays'),
}

model ListBeebotIntentUserSayResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: ListBeebotIntentUserSayResponseBody(name='body'),
}

/**
 * @summary ListBeebotIntentUserSay
 *
 * @param request ListBeebotIntentUserSayRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return ListBeebotIntentUserSayResponse
 */
async function listBeebotIntentUserSayWithOptions(request: ListBeebotIntentUserSayRequest, runtime: Util.RuntimeOptions): ListBeebotIntentUserSayResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.content)) {
    query['Content'] = request.content;
  }
  if (!Util.isUnset(request.instanceId)) {
    query['InstanceId'] = request.instanceId;
  }
  if (!Util.isUnset(request.intentId)) {
    query['IntentId'] = request.intentId;
  }
  if (!Util.isUnset(request.pageNumber)) {
    query['PageNumber'] = request.pageNumber;
  }
  if (!Util.isUnset(request.pageSize)) {
    query['PageSize'] = request.pageSize;
  }
  if (!Util.isUnset(request.scriptId)) {
    query['ScriptId'] = request.scriptId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'ListBeebotIntentUserSay',
    version = '2019-12-26',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary ListBeebotIntentUserSay
 *
 * @param request ListBeebotIntentUserSayRequest
 * @return ListBeebotIntentUserSayResponse
 */
async function listBeebotIntentUserSay(request: ListBeebotIntentUserSayRequest): ListBeebotIntentUserSayResponse {
  var runtime = new Util.RuntimeOptions{};
  return listBeebotIntentUserSayWithOptions(request, runtime);
}

model ListChatbotInstancesRequest {
  agentKey?: string(name='AgentKey'),
  pageNumber?: int32(name='PageNumber', description='This parameter is required.', example='1'),
  pageSize?: int32(name='PageSize', description='This parameter is required.', example='10'),
}

model ListChatbotInstancesResponseBody = {
  bots?: [ 
    {
      avatar?: string(name='Avatar', example='https://ccrm.wengine.cn/ccrm/system/common/fileDownload/noToken?fileId=975cdeaa064846e3b6004abd9ba1d7c8'),
      createTime?: string(name='CreateTime', example='2022-01-18T02:36:00Z'),
      instanceId?: string(name='InstanceId', example='e874fcf0-d2f4-4e62-9377-b6f35fe55210'),
      introduction?: string(name='Introduction'),
      languageCode?: string(name='LanguageCode', example='zh-cn'),
      name?: string(name='Name'),
      timeZone?: string(name='TimeZone', example='Asia/Shanghai'),
    }
  ](name='Bots'),
  code?: string(name='Code', example='OK'),
  httpStatusCode?: int32(name='HttpStatusCode', example='200'),
  message?: string(name='Message', example='Success'),
  pageNumber?: long(name='PageNumber', example='5'),
  pageSize?: long(name='PageSize', example='10'),
  requestId?: string(name='RequestId', example='254EB995-DEDF-48A4-9101-9CA5B72FFBCC'),
  success?: boolean(name='Success', example='true'),
  totalCount?: long(name='TotalCount', example='100'),
}

model ListChatbotInstancesResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: ListChatbotInstancesResponseBody(name='body'),
}

/**
 * @param request ListChatbotInstancesRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return ListChatbotInstancesResponse
 */
async function listChatbotInstancesWithOptions(request: ListChatbotInstancesRequest, runtime: Util.RuntimeOptions): ListChatbotInstancesResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.agentKey)) {
    query['AgentKey'] = request.agentKey;
  }
  if (!Util.isUnset(request.pageNumber)) {
    query['PageNumber'] = request.pageNumber;
  }
  if (!Util.isUnset(request.pageSize)) {
    query['PageSize'] = request.pageSize;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'ListChatbotInstances',
    version = '2019-12-26',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @param request ListChatbotInstancesRequest
 * @return ListChatbotInstancesResponse
 */
async function listChatbotInstances(request: ListChatbotInstancesRequest): ListChatbotInstancesResponse {
  var runtime = new Util.RuntimeOptions{};
  return listChatbotInstancesWithOptions(request, runtime);
}

model ListDialogueFlowsRequest {
  instanceId?: string(name='InstanceId', description='This parameter is required.', example='361c8a53-0e29-42f3-8aa7-c7752d010399'),
  scriptId?: string(name='ScriptId', description='This parameter is required.', example='d7c28efb-47f7-4a85-a522-5038e30a0b98'),
}

model ListDialogueFlowsResponseBody = {
  code?: string(name='Code', example='OK'),
  dialogueFlows?: [ 
    {
      dialogueFlowDefinition?: string(name='DialogueFlowDefinition'),
      dialogueFlowId?: string(name='DialogueFlowId', example='dae01529-3c3e-458e-b07a-97643d09ebb9'),
      dialogueFlowName?: string(name='DialogueFlowName'),
      dialogueFlowType?: string(name='DialogueFlowType', example='MainFlow'),
      scriptId?: string(name='ScriptId', example='2d5aa451-661f-4f08-b0c4-28eec78decc4'),
      scriptVersion?: string(name='ScriptVersion', example='1569220563549'),
    }
  ](name='DialogueFlows'),
  httpStatusCode?: int32(name='HttpStatusCode', example='200'),
  message?: string(name='Message', example='Success'),
  requestId?: string(name='RequestId', example='254EB995-DEDF-48A4-9101-9CA5B72FFBCC'),
  success?: boolean(name='Success', example='true'),
}

model ListDialogueFlowsResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: ListDialogueFlowsResponseBody(name='body'),
}

/**
 * @param request ListDialogueFlowsRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return ListDialogueFlowsResponse
 */
async function listDialogueFlowsWithOptions(request: ListDialogueFlowsRequest, runtime: Util.RuntimeOptions): ListDialogueFlowsResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.instanceId)) {
    query['InstanceId'] = request.instanceId;
  }
  if (!Util.isUnset(request.scriptId)) {
    query['ScriptId'] = request.scriptId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'ListDialogueFlows',
    version = '2019-12-26',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @param request ListDialogueFlowsRequest
 * @return ListDialogueFlowsResponse
 */
async function listDialogueFlows(request: ListDialogueFlowsRequest): ListDialogueFlowsResponse {
  var runtime = new Util.RuntimeOptions{};
  return listDialogueFlowsWithOptions(request, runtime);
}

model ListDownloadTasksRequest {
  instanceId?: string(name='InstanceId'),
  pageNumber?: int32(name='PageNumber', description='This parameter is required.', example='1'),
  pageSize?: int32(name='PageSize', description='This parameter is required.', example='10'),
}

model ListDownloadTasksResponseBody = {
  code?: string(name='Code', example='OK'),
  downloadTasks?: {
    list?: [ 
      {
        downloadTaskFiles?: [ 
          {
            fileId?: string(name='FileId', example='UPLOADED/RECORDING/d5c651b3-3c0f-44b8-aafd-40526f2fb43d/dd33377f-abad-471b-84dd-04aed572ce60_2.wav'),
            progress?: int32(name='Progress', example='10'),
            status?: string(name='Status', example='Empty'),
            title?: string(name='Title'),
          }
        ](name='DownloadTaskFiles'),
        expireTime?: long(name='ExpireTime', example='1646792941'),
        status?: string(name='Status', example='Empty'),
        taskId?: string(name='TaskId', example='6b0e547e-501c-480a-812f-d27e28e74f9a'),
        title?: string(name='Title'),
      }
    ](name='List'),
    pageNumber?: int32(name='PageNumber', example='1'),
    pageSize?: int32(name='PageSize', example='20'),
    totalCount?: int32(name='TotalCount', example='2'),
  }(name='DownloadTasks'),
  httpStatusCode?: int32(name='HttpStatusCode', example='200'),
  message?: string(name='Message', example='Success'),
  requestId?: string(name='RequestId', example='904CFA7B-8AD9-50FF-9B3E-404B20B9EE31'),
  success?: boolean(name='Success', example='True'),
}

model ListDownloadTasksResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: ListDownloadTasksResponseBody(name='body'),
}

/**
 * @param request ListDownloadTasksRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return ListDownloadTasksResponse
 */
async function listDownloadTasksWithOptions(request: ListDownloadTasksRequest, runtime: Util.RuntimeOptions): ListDownloadTasksResponse {
  Util.validateModel(request);
  var query = OpenApiUtil.query(Util.toMap(request));
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'ListDownloadTasks',
    version = '2019-12-26',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'GET',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @param request ListDownloadTasksRequest
 * @return ListDownloadTasksResponse
 */
async function listDownloadTasks(request: ListDownloadTasksRequest): ListDownloadTasksResponse {
  var runtime = new Util.RuntimeOptions{};
  return listDownloadTasksWithOptions(request, runtime);
}

model ListFlashSmsTemplatesRequest {
  configId?: string(name='ConfigId', description='This parameter is required.', example='fe542524-9585-4cc7-be54-c8782ed7f60e'),
  instanceId?: string(name='InstanceId', description='This parameter is required.', example='361c8a53-0e29-42f3-8aa7-c7752d010399'),
  providerId?: string(name='ProviderId', description='This parameter is required.', example='Uincall'),
}

model ListFlashSmsTemplatesResponseBody = {
  code?: string(name='Code', example='OK'),
  data?: [ 
    {
      templateContent?: string(name='TemplateContent'),
      templateId?: string(name='TemplateId', example='17*******************01'),
      templateName?: string(name='TemplateName'),
    }
  ](name='Data'),
  httpStatusCode?: int32(name='HttpStatusCode', example='200'),
  message?: string(name='Message'),
  requestId?: string(name='RequestId', example='EC08CC41-6870-5594-939A-F758F057898F'),
  success?: boolean(name='Success', example='true'),
}

model ListFlashSmsTemplatesResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: ListFlashSmsTemplatesResponseBody(name='body'),
}

/**
 * @param request ListFlashSmsTemplatesRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return ListFlashSmsTemplatesResponse
 */
async function listFlashSmsTemplatesWithOptions(request: ListFlashSmsTemplatesRequest, runtime: Util.RuntimeOptions): ListFlashSmsTemplatesResponse {
  Util.validateModel(request);
  var query = OpenApiUtil.query(Util.toMap(request));
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'ListFlashSmsTemplates',
    version = '2019-12-26',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'GET',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @param request ListFlashSmsTemplatesRequest
 * @return ListFlashSmsTemplatesResponse
 */
async function listFlashSmsTemplates(request: ListFlashSmsTemplatesRequest): ListFlashSmsTemplatesResponse {
  var runtime = new Util.RuntimeOptions{};
  return listFlashSmsTemplatesWithOptions(request, runtime);
}

model ListGlobalQuestionsRequest {
  instanceId?: string(name='InstanceId', description='This parameter is required.', example='361c8a53-0e29-42f3-8aa7-c7752d010399'),
  pageNumber?: int32(name='PageNumber', description='This parameter is required.', example='1'),
  pageSize?: int32(name='PageSize', description='This parameter is required.', example='10'),
  scriptId?: string(name='ScriptId', description='This parameter is required.', example='aa279896-64a6-4182-864c-4f2b04ec8d17'),
}

model ListGlobalQuestionsResponseBody = {
  code?: string(name='Code', example='OK'),
  globalQuestions?: {
    list?: [ 
      {
        answers?: string(name='Answers'),
        globalQuestionId?: string(name='GlobalQuestionId', example='53c27755-d41e-46a6-bb3c-4f66f257d50c'),
        globalQuestionName?: string(name='GlobalQuestionName'),
        globalQuestionType?: string(name='GlobalQuestionType', example='SYSTEM'),
        questions?: string(name='Questions'),
        scriptId?: string(name='ScriptId', example='aa279896-64a6-4182-864c-4f2b04ec8d17'),
      }
    ](name='List'),
    pageNumber?: int32(name='PageNumber', example='1'),
    pageSize?: int32(name='PageSize', example='10'),
    totalCount?: int32(name='TotalCount', example='12'),
  }(name='GlobalQuestions'),
  httpStatusCode?: int32(name='HttpStatusCode', example='200'),
  message?: string(name='Message', example='Success'),
  requestId?: string(name='RequestId', example='254EB995-DEDF-48A4-9101-9CA5B72FFBCC'),
  success?: boolean(name='Success', example='true'),
}

model ListGlobalQuestionsResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: ListGlobalQuestionsResponseBody(name='body'),
}

/**
 * @param request ListGlobalQuestionsRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return ListGlobalQuestionsResponse
 */
async function listGlobalQuestionsWithOptions(request: ListGlobalQuestionsRequest, runtime: Util.RuntimeOptions): ListGlobalQuestionsResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.instanceId)) {
    query['InstanceId'] = request.instanceId;
  }
  if (!Util.isUnset(request.pageNumber)) {
    query['PageNumber'] = request.pageNumber;
  }
  if (!Util.isUnset(request.pageSize)) {
    query['PageSize'] = request.pageSize;
  }
  if (!Util.isUnset(request.scriptId)) {
    query['ScriptId'] = request.scriptId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'ListGlobalQuestions',
    version = '2019-12-26',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @param request ListGlobalQuestionsRequest
 * @return ListGlobalQuestionsResponse
 */
async function listGlobalQuestions(request: ListGlobalQuestionsRequest): ListGlobalQuestionsResponse {
  var runtime = new Util.RuntimeOptions{};
  return listGlobalQuestionsWithOptions(request, runtime);
}

model ListInstancesRequest {
  name?: string(name='Name'),
  pageNumber?: int32(name='PageNumber'),
  pageSize?: int32(name='PageSize'),
  resourceGroupId?: string(name='ResourceGroupId', example='rg-acfm3iugit3uw7a'),
  tag?: [ 
    {
      key?: string(name='Key', example='name'),
      value?: string(name='Value', example='xxx'),
    }
  ](name='Tag'),
}

model ListInstancesResponseBody = {
  code?: string(name='Code', example='OK'),
  httpStatusCode?: int32(name='HttpStatusCode', example='200'),
  instances?: [ 
    {
      creationTime?: long(name='CreationTime', example='1578469042851'),
      creatorId?: long(name='CreatorId', example='34234'),
      creatorName?: string(name='CreatorName', example='xxx'),
      instanceDescription?: string(name='InstanceDescription'),
      instanceId?: string(name='InstanceId', example='90515b5-6115-4ccf-83e2-52d5bfaf2ddf'),
      instanceName?: string(name='InstanceName'),
      isPreset?: boolean(name='IsPreset'),
      maxConcurrentConversation?: int32(name='MaxConcurrentConversation', example='10'),
      ownerName?: string(name='OwnerName', example='xxx'),
      resourceGroupId?: string(name='ResourceGroupId', example='90515b5-6115-4ccf-83e2-52d5bfaf2ddf'),
      resourceTags?: [ 
        {
          key?: string(name='Key', example='age'),
          value?: string(name='Value', example='20'),
        }
      ](name='ResourceTags', example='[]'),
    }
  ](name='Instances'),
  message?: string(name='Message', example='Success'),
  pageNumber?: int32(name='PageNumber'),
  pageSize?: int32(name='PageSize'),
  requestId?: string(name='RequestId', example='254EB995-DEDF-48A4-9101-9CA5B72FFBCC'),
  success?: boolean(name='Success', example='true'),
  totalCount?: int32(name='TotalCount'),
}

model ListInstancesResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: ListInstancesResponseBody(name='body'),
}

/**
 * @param request ListInstancesRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return ListInstancesResponse
 */
async function listInstancesWithOptions(request: ListInstancesRequest, runtime: Util.RuntimeOptions): ListInstancesResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.name)) {
    query['Name'] = request.name;
  }
  if (!Util.isUnset(request.pageNumber)) {
    query['PageNumber'] = request.pageNumber;
  }
  if (!Util.isUnset(request.pageSize)) {
    query['PageSize'] = request.pageSize;
  }
  if (!Util.isUnset(request.resourceGroupId)) {
    query['ResourceGroupId'] = request.resourceGroupId;
  }
  if (!Util.isUnset(request.tag)) {
    query['Tag'] = request.tag;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'ListInstances',
    version = '2019-12-26',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @param request ListInstancesRequest
 * @return ListInstancesResponse
 */
async function listInstances(request: ListInstancesRequest): ListInstancesResponse {
  var runtime = new Util.RuntimeOptions{};
  return listInstancesWithOptions(request, runtime);
}

model ListIntentionsRequest {
  annotationMissionDataSourceType?: long(name='AnnotationMissionDataSourceType', example='1'),
  botId?: string(name='BotId', example='chatbot-cn-n7QmzrUnNe'),
  environment?: long(name='Environment', example='2'),
  instanceId?: string(name='InstanceId', example='e5035654-1745-484a-8c5b-165f7c7bcd79'),
  intentId?: long(name='IntentId', example='10717802'),
  pageIndex?: int32(name='PageIndex', example='1'),
  pageSize?: int32(name='PageSize', example='10'),
  scriptId?: string(name='ScriptId', example='c5c5d8c0-c0f1-48a7-be2b-dc46006d888a'),
  userNick?: string(name='UserNick'),
}

model ListIntentionsResponseBody = {
  code?: string(name='Code', example='OK'),
  data?: {
    botId?: string(name='BotId', example='chatbot-cn-n7QmzrUnNe'),
    intentList?: [ 
      {
        alias?: [ string ](name='Alias'),
        botId?: long(name='BotId', example='chatbot-cn-n7QmzrUnNe'),
        botName?: string(name='BotName', example='111'),
        dialogId?: string(name='DialogId', example='50099'),
        id?: long(name='Id', example='10717802'),
        language?: string(name='Language', example='zh-cn'),
        name?: string(name='Name'),
        ruleCheck?: [ 
          {
            error?: [ string ](name='Error'),
            strict?: boolean(name='Strict', example='true'),
            text?: string(name='Text'),
            warning?: [ string ](name='Warning'),
          }
        ](name='RuleCheck'),
        slot?: [ 
          {
            feedbackFunctions?: [ 
              {
                aliyunFunction?: string(name='AliyunFunction', example='test'),
                aliyunService?: string(name='AliyunService', example='test'),
                code?: string(name='Code', example='OK'),
                description?: string(name='Description', example='GA setup for HPC cn4-HPC-EndUserServer-GlobalAccelerator'),
                endPoint?: string(name='EndPoint', example='cn-hangzhou.log.aliyuncs.com'),
                function?: string(name='Function', example='count'),
                name?: string(name='Name'),
                params?: map[string]any(name='Params'),
                switch?: [ 
                  {
                    id?: string(name='Id', example='b9932604-08ae-4525-bbe5-c8cce3066070'),
                    label?: string(name='Label', example='SQL_SUB_QUERY'),
                    name?: string(name='Name'),
                    type?: string(name='Type', example='PASSKEY'),
                    value?: string(name='Value', example='BASE_VALIDATE_FILTER_SWITCH'),
                  }
                ](name='Switch'),
                type?: string(name='Type', example='cluster'),
              }
            ](name='FeedbackFunctions'),
            feedbackType?: string(name='FeedbackType', example='test'),
            id?: string(name='Id', example='9ec31b50-32b8-11eb-9478-19d2d885afdb'),
            isArray?: boolean(name='IsArray', example='false'),
            isEncrypt?: boolean(name='IsEncrypt', example='false'),
            isInteractive?: boolean(name='IsInteractive', example='false'),
            isNecessary?: boolean(name='IsNecessary', example='true'),
            lifeSpan?: int32(name='LifeSpan', example='0'),
            name?: string(name='Name'),
            question?: [ string ](name='Question'),
            tags?: [ 
              {
                userSayId?: string(name='UserSayId', example='17448458'),
                value?: string(name='Value'),
              }
            ](name='Tags'),
            value?: string(name='Value'),
          }
        ](name='Slot'),
        tableId?: long(name='TableId', example='43258'),
        type?: int32(name='Type', example='0'),
        userSay?: [ 
          {
            fromId?: string(name='FromId', example='1234567'),
            id?: string(name='Id', example='17448458'),
            strict?: boolean(name='Strict', example='true'),
            userSayData?: [ 
              {
                slotId?: string(name='SlotId', example='9ec31b50-32b8-11eb-9478-19d2d885afdb'),
                text?: string(name='Text'),
              }
            ](name='UserSayData'),
          }
        ](name='UserSay'),
      }
    ](name='IntentList'),
    message?: string(name='Message', example='Success'),
    success?: boolean(name='Success', example='true'),
  }(name='Data'),
  httpStatusCode?: int32(name='HttpStatusCode', example='200'),
  message?: string(name='Message', example='Success'),
  requestId?: string(name='RequestId', example='254EB995-DEDF-48A4-9101-9CA5B72FFBCC'),
  success?: boolean(name='Success', example='true'),
}

model ListIntentionsResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: ListIntentionsResponseBody(name='body'),
}

/**
 * @summary 意图列表
 *
 * @param request ListIntentionsRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return ListIntentionsResponse
 */
async function listIntentionsWithOptions(request: ListIntentionsRequest, runtime: Util.RuntimeOptions): ListIntentionsResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.annotationMissionDataSourceType)) {
    query['AnnotationMissionDataSourceType'] = request.annotationMissionDataSourceType;
  }
  if (!Util.isUnset(request.botId)) {
    query['BotId'] = request.botId;
  }
  if (!Util.isUnset(request.environment)) {
    query['Environment'] = request.environment;
  }
  if (!Util.isUnset(request.instanceId)) {
    query['InstanceId'] = request.instanceId;
  }
  if (!Util.isUnset(request.intentId)) {
    query['IntentId'] = request.intentId;
  }
  if (!Util.isUnset(request.pageIndex)) {
    query['PageIndex'] = request.pageIndex;
  }
  if (!Util.isUnset(request.pageSize)) {
    query['PageSize'] = request.pageSize;
  }
  if (!Util.isUnset(request.scriptId)) {
    query['ScriptId'] = request.scriptId;
  }
  if (!Util.isUnset(request.userNick)) {
    query['UserNick'] = request.userNick;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'ListIntentions',
    version = '2019-12-26',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 意图列表
 *
 * @param request ListIntentionsRequest
 * @return ListIntentionsResponse
 */
async function listIntentions(request: ListIntentionsRequest): ListIntentionsResponse {
  var runtime = new Util.RuntimeOptions{};
  return listIntentionsWithOptions(request, runtime);
}

model ListIntentsRequest {
  instanceId?: string(name='InstanceId', description='This parameter is required.', example='af81a389-91f0-4157-8d82-720edd02b66a'),
  keyword?: string(name='Keyword', example='""'),
  pageNumber?: int32(name='PageNumber', description='This parameter is required.', example='1'),
  pageSize?: int32(name='PageSize', description='This parameter is required.', example='10'),
  scriptId?: string(name='ScriptId', description='This parameter is required.', example='b9ff4e88-65f9-4eb3-987c-11ba51f3f24d'),
}

model ListIntentsResponseBody = {
  code?: string(name='Code', example='OK'),
  httpStatusCode?: int32(name='HttpStatusCode', example='200'),
  intents?: {
    list?: [ 
      {
        createTime?: long(name='CreateTime', example='1578469042851'),
        intentDescription?: string(name='IntentDescription'),
        intentId?: string(name='IntentId', example='a8494b35-eefb-4c8a-887b-b60d2f0fa57a'),
        intentName?: string(name='IntentName'),
        keywords?: string(name='Keywords'),
        scriptId?: string(name='ScriptId', example='6ef95fd5-558f-4ee8-af34-b2ede087a87c'),
        updateTime?: long(name='UpdateTime', example='1578469042851'),
        utterances?: string(name='Utterances'),
      }
    ](name='List'),
    pageNumber?: int32(name='PageNumber', example='1'),
    pageSize?: int32(name='PageSize', example='10'),
    totalCount?: int32(name='TotalCount', example='20'),
  }(name='Intents'),
  message?: string(name='Message', example='Success'),
  requestId?: string(name='RequestId', example='254EB995-DEDF-48A4-9101-9CA5B72FFBCC'),
  success?: boolean(name='Success', example='true'),
}

model ListIntentsResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: ListIntentsResponseBody(name='body'),
}

/**
 * @param request ListIntentsRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return ListIntentsResponse
 */
async function listIntentsWithOptions(request: ListIntentsRequest, runtime: Util.RuntimeOptions): ListIntentsResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.instanceId)) {
    query['InstanceId'] = request.instanceId;
  }
  if (!Util.isUnset(request.keyword)) {
    query['Keyword'] = request.keyword;
  }
  if (!Util.isUnset(request.pageNumber)) {
    query['PageNumber'] = request.pageNumber;
  }
  if (!Util.isUnset(request.pageSize)) {
    query['PageSize'] = request.pageSize;
  }
  if (!Util.isUnset(request.scriptId)) {
    query['ScriptId'] = request.scriptId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'ListIntents',
    version = '2019-12-26',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @param request ListIntentsRequest
 * @return ListIntentsResponse
 */
async function listIntents(request: ListIntentsRequest): ListIntentsResponse {
  var runtime = new Util.RuntimeOptions{};
  return listIntentsWithOptions(request, runtime);
}

model ListJobGroupsRequest {
  asyncQuery?: boolean(name='AsyncQuery', example='true'),
  endTime?: long(name='EndTime', example='1579965079000'),
  instanceId?: string(name='InstanceId', description='This parameter is required.', example='174952ab-9825-4cc9-a5e2-de82d7fa4cdd'),
  jobGroupStatusFilter?: string(name='JobGroupStatusFilter'),
  onlyMinConcurrencyEnabled?: boolean(name='OnlyMinConcurrencyEnabled'),
  pageNumber?: int32(name='PageNumber', description='This parameter is required.', example='1'),
  pageSize?: int32(name='PageSize', description='This parameter is required.', example='10'),
  searchText?: string(name='SearchText'),
  startTime?: long(name='StartTime', example='1578965079000'),
}

model ListJobGroupsResponseBody = {
  asyncTaskId?: string(name='AsyncTaskId', example='2bb0cf15-2126-4c9b-bc30-bb5301b96284'),
  code?: string(name='Code', example='OK'),
  httpStatusCode?: int32(name='HttpStatusCode', example='200'),
  jobGroups?: {
    list?: [ 
      {
        creationTime?: long(name='CreationTime', example='1578550074361'),
        exportProgress?: {
          fileHttpUrl?: string(name='FileHttpUrl', example='http://www.xxx.com/xxx'),
          progress?: string(name='Progress', example='50'),
          status?: string(name='Status', example='PENDING'),
        }(name='ExportProgress', example='{}'),
        jobDataParsingTaskId?: string(name='JobDataParsingTaskId', example='c62e6789-28a8-41db-941e-171a01d3b3b9'),
        jobGroupDescription?: string(name='JobGroupDescription'),
        jobGroupId?: string(name='JobGroupId', example='c62e6789-28a8-41db-941e-171a01d3b3b9'),
        jobGroupName?: string(name='JobGroupName'),
        minConcurrency?: int32(name='MinConcurrency'),
        modifyTime?: string(name='ModifyTime', example='1578550074361'),
        progress?: {
          cancelledNum?: int32(name='CancelledNum', example='5'),
          duration?: int32(name='Duration', example='1578550074361'),
          executingNum?: int32(name='ExecutingNum', example='10'),
          failedNum?: int32(name='FailedNum', example='5'),
          pausedNum?: int32(name='PausedNum', example='5'),
          scheduling?: int32(name='Scheduling', example='10'),
          startTime?: long(name='StartTime', example='1578550074361'),
          status?: string(name='Status'),
          totalCompleted?: int32(name='TotalCompleted', example='3'),
          totalJobs?: int32(name='TotalJobs', example='20'),
          totalNotAnswered?: int32(name='TotalNotAnswered', example='1'),
        }(name='Progress', example='{}'),
        scriptId?: string(name='ScriptId', example='c62e6789-28a8-41db-941e-171a01d3b3b9'),
        scriptName?: string(name='ScriptName'),
        scriptVersion?: string(name='ScriptVersion'),
        status?: string(name='Status', example='Draft'),
        strategy?: {
          endTime?: long(name='EndTime'),
          startTime?: long(name='StartTime'),
        }(name='Strategy', example='{}'),
        totalCallNum?: int32(name='TotalCallNum', example='10'),
      }
    ](name='List'),
    pageNumber?: int32(name='PageNumber', example='1'),
    pageSize?: int32(name='PageSize', example='10'),
    totalCount?: int32(name='TotalCount', example='100'),
  }(name='JobGroups'),
  message?: string(name='Message', example='Success'),
  requestId?: string(name='RequestId', example='254EB995-DEDF-48A4-9101-9CA5B72FFBCC'),
  success?: boolean(name='Success', example='true'),
}

model ListJobGroupsResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: ListJobGroupsResponseBody(name='body'),
}

/**
 * @param request ListJobGroupsRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return ListJobGroupsResponse
 */
async function listJobGroupsWithOptions(request: ListJobGroupsRequest, runtime: Util.RuntimeOptions): ListJobGroupsResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.asyncQuery)) {
    query['AsyncQuery'] = request.asyncQuery;
  }
  if (!Util.isUnset(request.endTime)) {
    query['EndTime'] = request.endTime;
  }
  if (!Util.isUnset(request.instanceId)) {
    query['InstanceId'] = request.instanceId;
  }
  if (!Util.isUnset(request.jobGroupStatusFilter)) {
    query['JobGroupStatusFilter'] = request.jobGroupStatusFilter;
  }
  if (!Util.isUnset(request.onlyMinConcurrencyEnabled)) {
    query['OnlyMinConcurrencyEnabled'] = request.onlyMinConcurrencyEnabled;
  }
  if (!Util.isUnset(request.pageNumber)) {
    query['PageNumber'] = request.pageNumber;
  }
  if (!Util.isUnset(request.pageSize)) {
    query['PageSize'] = request.pageSize;
  }
  if (!Util.isUnset(request.searchText)) {
    query['SearchText'] = request.searchText;
  }
  if (!Util.isUnset(request.startTime)) {
    query['StartTime'] = request.startTime;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'ListJobGroups',
    version = '2019-12-26',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @param request ListJobGroupsRequest
 * @return ListJobGroupsResponse
 */
async function listJobGroups(request: ListJobGroupsRequest): ListJobGroupsResponse {
  var runtime = new Util.RuntimeOptions{};
  return listJobGroupsWithOptions(request, runtime);
}

model ListJobGroupsAsyncRequest {
  asyncTaskId?: string(name='AsyncTaskId', description='This parameter is required.', example='6243d904-939d-42ce-a8e4-886a139e77a3'),
}

model ListJobGroupsAsyncResponseBody = {
  code?: string(name='Code', example='OK'),
  httpStatusCode?: int32(name='HttpStatusCode', example='200'),
  jobGroups?: [ 
    {
      creationTime?: long(name='CreationTime', example='1640316786259'),
      exportProgress?: {
        fileHttpUrl?: string(name='FileHttpUrl', example='http://'),
        progress?: string(name='Progress', example='50'),
        status?: string(name='Status', example='PENDING'),
      }(name='ExportProgress', example='{}'),
      jobDataParsingTaskId?: string(name='JobDataParsingTaskId', example='254EB995-DEDF-48A4-9101-9CA5B72FFBCC'),
      jobGroupDescription?: string(name='JobGroupDescription', example='xxx'),
      jobGroupId?: string(name='JobGroupId', example='254EB995-DEDF-48A4-9101-9CA5B72FFBCC'),
      jobGroupName?: string(name='JobGroupName', example='xxx'),
      minConcurrency?: int32(name='MinConcurrency'),
      modifyTime?: string(name='ModifyTime', example='1640316786259'),
      progress?: {
        cancelledNum?: int32(name='CancelledNum', example='10'),
        duration?: int32(name='Duration', example='1000'),
        executingNum?: int32(name='ExecutingNum', example='20'),
        failedNum?: int32(name='FailedNum', example='10'),
        pausedNum?: int32(name='PausedNum', example='10'),
        scheduling?: int32(name='Scheduling', example='20'),
        startTime?: long(name='StartTime', example='1640316786259'),
        status?: string(name='Status'),
        totalCompleted?: int32(name='TotalCompleted', example='10'),
        totalJobs?: int32(name='TotalJobs', example='100'),
        totalNotAnswered?: int32(name='TotalNotAnswered', example='1'),
      }(name='Progress', example='{}'),
      scriptId?: string(name='ScriptId', example='254EB995-DEDF-48A4-9101-9CA5B72FFBCC'),
      scriptName?: string(name='ScriptName', example='xxxx'),
      scriptVersion?: string(name='ScriptVersion', example='111'),
      status?: string(name='Status', example='Scheduling'),
      strategy?: {
        endTime?: long(name='EndTime', example='1640316786259'),
        startTime?: long(name='StartTime', example='1640316786259'),
      }(name='Strategy', example='{}'),
      totalCallNum?: int32(name='TotalCallNum', example='100'),
    }
  ](name='JobGroups'),
  message?: string(name='Message', example='Success'),
  pageNumber?: int32(name='PageNumber', example='1'),
  pageSize?: int32(name='PageSize', example='10'),
  requestId?: string(name='RequestId', example='254EB995-DEDF-48A4-9101-9CA5B72FFBCC'),
  success?: boolean(name='Success', example='true'),
  timeout?: boolean(name='Timeout', example='true'),
  totalCount?: int32(name='TotalCount', example='100'),
  vaild?: boolean(name='Vaild', example='true'),
}

model ListJobGroupsAsyncResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: ListJobGroupsAsyncResponseBody(name='body'),
}

/**
 * @param request ListJobGroupsAsyncRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return ListJobGroupsAsyncResponse
 */
async function listJobGroupsAsyncWithOptions(request: ListJobGroupsAsyncRequest, runtime: Util.RuntimeOptions): ListJobGroupsAsyncResponse {
  Util.validateModel(request);
  var query = OpenApiUtil.query(Util.toMap(request));
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'ListJobGroupsAsync',
    version = '2019-12-26',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'GET',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @param request ListJobGroupsAsyncRequest
 * @return ListJobGroupsAsyncResponse
 */
async function listJobGroupsAsync(request: ListJobGroupsAsyncRequest): ListJobGroupsAsyncResponse {
  var runtime = new Util.RuntimeOptions{};
  return listJobGroupsAsyncWithOptions(request, runtime);
}

model ListJobsRequest {
  instanceId?: string(name='InstanceId', description='This parameter is required.', example='af81a389-91f0-4157-8d82-720edd02b66a'),
  jobId?: [ string ](name='JobId', description='This parameter is required.', example='24fb9a8d-f20e-4ee2-a11c-094dda68c5cc'),
}

model ListJobsResponseBody = {
  code?: string(name='Code', example='OK'),
  httpStatusCode?: int32(name='HttpStatusCode', example='200'),
  jobs?: [ 
    {
      callingNumbers?: [ string ](name='CallingNumbers'),
      contacts?: [ 
        {
          contactId?: string(name='ContactId', example='db3db762-e421-44c9-9a01-cb423470757c'),
          contactName?: string(name='ContactName'),
          honorific?: string(name='Honorific'),
          jobId?: string(name='JobId', example='72dcd26b-f12d-4c27-b3af-18f6aed5b160'),
          phoneNumber?: string(name='PhoneNumber', example='135****8888'),
          referenceId?: string(name='ReferenceId', example='2fa6bac3-06da-4315-82ab-72d6fd3a6f34'),
          role?: string(name='Role', example='*'),
          state?: string(name='State', example='Available'),
        }
      ](name='Contacts'),
      extras?: [ 
        {
          key?: string(name='Key', example='name'),
          value?: string(name='Value'),
        }
      ](name='Extras'),
      failureReason?: string(name='FailureReason', example='NoAnswer'),
      jobGroupId?: string(name='JobGroupId', example='fce6c599-8ede-40e3-9f78-0928eda7b4e8'),
      jobId?: string(name='JobId', example='b72425bd-7871-4050-838e-033d80d754b7'),
      priority?: int32(name='Priority', example='5'),
      referenceId?: string(name='ReferenceId', example='d5971d98-7312-4f0e-a918-a17d67133e28'),
      scenarioId?: string(name='ScenarioId', example='254EB995-DEDF-48A4-9101-9CA5B72FFBCC'),
      status?: string(name='Status', example='Succeeded'),
      strategyId?: string(name='StrategyId', example='c8a2b7f2-ad1a-4865-b872-d0080d9802d9'),
      summary?: [ 
        {
          category?: string(name='Category', example='{}'),
          content?: string(name='Content', example='5'),
          summaryName?: string(name='SummaryName', example='score'),
        }
      ](name='Summary'),
      systemPriority?: int32(name='SystemPriority', example='1'),
      tasks?: [ 
        {
          actualTime?: long(name='ActualTime', example='1579068424883'),
          brief?: string(name='Brief', example='1'),
          callId?: string(name='CallId', example='1528189846043'),
          calledNumber?: string(name='CalledNumber', example='135****8888'),
          callingNumber?: string(name='CallingNumber', example='0571****3106'),
          chatbotId?: string(name='ChatbotId', example='1234'),
          contact?: {
            contactId?: string(name='ContactId', example='db3db762-e421-44c9-9a01-cb423470757c'),
            contactName?: string(name='ContactName'),
            honorific?: string(name='Honorific'),
            jobId?: string(name='JobId', example='b72425bd-7871-4050-838e-033d80d754b7'),
            phoneNumber?: string(name='PhoneNumber', example='135****8888'),
            referenceId?: string(name='ReferenceId', example='2fa6bac3-06da-4315-82ab-72d6fd3a6f34'),
            role?: string(name='Role', example='*'),
            state?: string(name='State', example='Available'),
          }(name='Contact'),
          conversation?: [ 
            {
              script?: string(name='Script'),
              speaker?: string(name='Speaker', example='Robot'),
              summary?: [ 
                {
                  category?: string(name='Category'),
                  content?: string(name='Content'),
                  summaryName?: string(name='SummaryName'),
                }
              ](name='Summary'),
              timestamp?: long(name='Timestamp', example='1579068424883'),
            }
          ](name='Conversation'),
          duration?: int32(name='Duration', example='120'),
          jobId?: string(name='JobId', example='b72425bd-7871-4050-838e-033d80d754b7'),
          planedTime?: long(name='PlanedTime', example='1579068424883'),
          scenarioId?: string(name='ScenarioId', example='ade80092-03d9-4f4d-ad4f-ab8a247d3150'),
          status?: string(name='Status', example='Succeeded'),
          taskId?: string(name='TaskId', example='ff44709e-39a6-43ba-959b-20fcabe3e496'),
        }
      ](name='Tasks'),
    }
  ](name='Jobs'),
  message?: string(name='Message', example='Success'),
  requestId?: string(name='RequestId', example='254EB995-DEDF-48A4-9101-9CA5B72FFBCC'),
  success?: boolean(name='Success', example='true'),
}

model ListJobsResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: ListJobsResponseBody(name='body'),
}

/**
 * @summary ListJobs
 *
 * @param request ListJobsRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return ListJobsResponse
 */
async function listJobsWithOptions(request: ListJobsRequest, runtime: Util.RuntimeOptions): ListJobsResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.instanceId)) {
    query['InstanceId'] = request.instanceId;
  }
  if (!Util.isUnset(request.jobId)) {
    query['JobId'] = request.jobId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'ListJobs',
    version = '2019-12-26',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary ListJobs
 *
 * @param request ListJobsRequest
 * @return ListJobsResponse
 */
async function listJobs(request: ListJobsRequest): ListJobsResponse {
  var runtime = new Util.RuntimeOptions{};
  return listJobsWithOptions(request, runtime);
}

model ListJobsByGroupRequest {
  instanceId?: string(name='InstanceId', description='This parameter is required.', example='af81a389-91f0-4157-8d82-720edd02b66a'),
  jobFailureReason?: string(name='JobFailureReason', example='NoAnswer'),
  jobGroupId?: string(name='JobGroupId', description='This parameter is required.', example='de48407d-309e-451a-81ec-6fb11f8fdbf3'),
  jobStatus?: string(name='JobStatus', example='Succeeded'),
  pageNumber?: int32(name='PageNumber', description='This parameter is required.', example='1'),
  pageSize?: int32(name='PageSize', description='This parameter is required.', example='10'),
}

model ListJobsByGroupResponseBody = {
  code?: string(name='Code', example='OK'),
  httpStatusCode?: int32(name='HttpStatusCode', example='200'),
  jobs?: {
    list?: [ 
      {
        callingNumbers?: [ string ](name='CallingNumbers'),
        contacts?: [ 
          {
            contactId?: string(name='ContactId', example='db3db762-e421-44c9-9a01-cb423470757c'),
            contactName?: string(name='ContactName'),
            honorific?: string(name='Honorific'),
            jobId?: string(name='JobId', example='72dcd26b-f12d-4c27-b3af-18f6aed5b160'),
            phoneNumber?: string(name='PhoneNumber', example='135****8888'),
            referenceId?: string(name='ReferenceId', example='2fa6bac3-06da-4315-82ab-72d6fd3a6f34'),
            role?: string(name='Role', example='*'),
            state?: string(name='State', example='Available'),
          }
        ](name='Contacts'),
        extras?: [ 
          {
            key?: string(name='Key', example='djrq'),
            value?: string(name='Value', example='2019-08-21 09:49:59.0'),
          }
        ](name='Extras'),
        failureReason?: string(name='FailureReason', example='NoAnswer'),
        jobGroupId?: string(name='JobGroupId', example='fce6c599-8ede-40e3-9f78-0928eda7b4e8'),
        jobId?: string(name='JobId', example='b72425bd-7871-4050-838e-033d80d754b7'),
        priority?: int32(name='Priority', example='5'),
        referenceId?: string(name='ReferenceId', example='d5971d98-7312-4f0e-a918-a17d67133e28'),
        scenarioId?: string(name='ScenarioId', example='ade80092-03d9-4f4d-ad4f-ab8a247d3150'),
        status?: string(name='Status', example='Succeeded'),
        strategyId?: string(name='StrategyId', example='c8a2b7f2-ad1a-4865-b872-d0080d9802d9'),
        summary?: [ 
          {
            category?: string(name='Category', example='{}'),
            content?: string(name='Content', example='5'),
            conversationDetailId?: string(name='ConversationDetailId', example='62a860f5-a8b3-4b75-9512-c7e04bb7c8bc'),
            jobGroupId?: string(name='JobGroupId', example='88e56cfb-33f8-477a-907c-0fe83292d924'),
            jobId?: string(name='JobId', example='f102a853-5f5a-47fb-8869-b31ea74a9620'),
            summaryId?: string(name='SummaryId', example='680f1905-81ae-4aab-99dd-2964dfb767fa'),
            summaryName?: string(name='SummaryName', example='score'),
            taskId?: string(name='TaskId', example='b0f35dd1-0337-402e-9c4f-3a6c2426950a'),
          }
        ](name='Summary'),
        systemPriority?: int32(name='SystemPriority', example='1'),
      }
    ](name='List'),
    pageNumber?: int32(name='PageNumber', example='1'),
    pageSize?: int32(name='PageSize', example='10'),
    totalCount?: int32(name='TotalCount', example='1'),
  }(name='Jobs'),
  message?: string(name='Message', example='Success'),
  requestId?: string(name='RequestId', example='254EB995-DEDF-48A4-9101-9CA5B72FFBCC'),
  success?: boolean(name='Success', example='true'),
}

model ListJobsByGroupResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: ListJobsByGroupResponseBody(name='body'),
}

/**
 * @param request ListJobsByGroupRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return ListJobsByGroupResponse
 */
async function listJobsByGroupWithOptions(request: ListJobsByGroupRequest, runtime: Util.RuntimeOptions): ListJobsByGroupResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.instanceId)) {
    query['InstanceId'] = request.instanceId;
  }
  if (!Util.isUnset(request.jobFailureReason)) {
    query['JobFailureReason'] = request.jobFailureReason;
  }
  if (!Util.isUnset(request.jobGroupId)) {
    query['JobGroupId'] = request.jobGroupId;
  }
  if (!Util.isUnset(request.jobStatus)) {
    query['JobStatus'] = request.jobStatus;
  }
  if (!Util.isUnset(request.pageNumber)) {
    query['PageNumber'] = request.pageNumber;
  }
  if (!Util.isUnset(request.pageSize)) {
    query['PageSize'] = request.pageSize;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'ListJobsByGroup',
    version = '2019-12-26',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @param request ListJobsByGroupRequest
 * @return ListJobsByGroupResponse
 */
async function listJobsByGroup(request: ListJobsByGroupRequest): ListJobsByGroupResponse {
  var runtime = new Util.RuntimeOptions{};
  return listJobsByGroupWithOptions(request, runtime);
}

model ListOutboundCallNumbersRequest {
  instanceId?: string(name='InstanceId', description='This parameter is required.', example='af81a389-91f0-4157-8d82-720edd02b66a'),
  pageNumber?: int32(name='PageNumber', description='This parameter is required.', example='1'),
  pageSize?: int32(name='PageSize', description='This parameter is required.', example='10'),
}

model ListOutboundCallNumbersResponseBody = {
  code?: string(name='Code', example='OK'),
  httpStatusCode?: int32(name='HttpStatusCode', example='200'),
  message?: string(name='Message', example='Success'),
  outboundCallNumbers?: {
    list?: [ 
      {
        number?: string(name='Number', example='10088'),
        outboundCallNumberId?: string(name='OutboundCallNumberId', example='fa0e21e9-caab-4629-9121-1e341243d599'),
        rateLimitCount?: string(name='RateLimitCount', example='10'),
        rateLimitPeriod?: string(name='RateLimitPeriod', example='100'),
      }
    ](name='List'),
    pageNumber?: int32(name='PageNumber', example='1'),
    pageSize?: int32(name='PageSize', example='10'),
    totalCount?: int32(name='TotalCount', example='10'),
  }(name='OutboundCallNumbers'),
  requestId?: string(name='RequestId', example='254EB995-DEDF-48A4-9101-9CA5B72FFBCC'),
  success?: boolean(name='Success', example='true'),
}

model ListOutboundCallNumbersResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: ListOutboundCallNumbersResponseBody(name='body'),
}

/**
 * @param request ListOutboundCallNumbersRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return ListOutboundCallNumbersResponse
 */
async function listOutboundCallNumbersWithOptions(request: ListOutboundCallNumbersRequest, runtime: Util.RuntimeOptions): ListOutboundCallNumbersResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.instanceId)) {
    query['InstanceId'] = request.instanceId;
  }
  if (!Util.isUnset(request.pageNumber)) {
    query['PageNumber'] = request.pageNumber;
  }
  if (!Util.isUnset(request.pageSize)) {
    query['PageSize'] = request.pageSize;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'ListOutboundCallNumbers',
    version = '2019-12-26',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @param request ListOutboundCallNumbersRequest
 * @return ListOutboundCallNumbersResponse
 */
async function listOutboundCallNumbers(request: ListOutboundCallNumbersRequest): ListOutboundCallNumbersResponse {
  var runtime = new Util.RuntimeOptions{};
  return listOutboundCallNumbersWithOptions(request, runtime);
}

model ListResourceTagsRequest {
  pageNumber?: int32(name='PageNumber', description='This parameter is required.', example='1'),
  pageSize?: int32(name='PageSize', description='This parameter is required.', example='10'),
  resourceType?: string(name='ResourceType', description='This parameter is required.', example='instance'),
}

model ListResourceTagsResponseBody = {
  code?: string(name='Code', example='OK'),
  httpStatusCode?: int32(name='HttpStatusCode', example='200'),
  message?: string(name='Message', example='Success'),
  requestId?: string(name='RequestId', example='254EB995-DEDF-48A4-9101-9CA5B72FFBCC'),
  resourceTags?: {
    list?: [ 
      {
        key?: string(name='Key', example='name'),
        value?: string(name='Value', example='xxx'),
      }
    ](name='List', example='[]'),
    pageNumber?: int32(name='PageNumber', example='1'),
    pageSize?: int32(name='PageSize', example='10'),
    totalCount?: int32(name='TotalCount', example='100'),
  }(name='ResourceTags', example='{}'),
  success?: boolean(name='Success', example='true'),
}

model ListResourceTagsResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: ListResourceTagsResponseBody(name='body'),
}

/**
 * @param request ListResourceTagsRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return ListResourceTagsResponse
 */
async function listResourceTagsWithOptions(request: ListResourceTagsRequest, runtime: Util.RuntimeOptions): ListResourceTagsResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.pageNumber)) {
    query['PageNumber'] = request.pageNumber;
  }
  if (!Util.isUnset(request.pageSize)) {
    query['PageSize'] = request.pageSize;
  }
  if (!Util.isUnset(request.resourceType)) {
    query['ResourceType'] = request.resourceType;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'ListResourceTags',
    version = '2019-12-26',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @param request ListResourceTagsRequest
 * @return ListResourceTagsResponse
 */
async function listResourceTags(request: ListResourceTagsRequest): ListResourceTagsResponse {
  var runtime = new Util.RuntimeOptions{};
  return listResourceTagsWithOptions(request, runtime);
}

model ListSchedulerInstancesRequest {
  instanceOwnerId?: long(name='InstanceOwnerId', example='1092143545442862'),
}

model ListSchedulerInstancesResponseBody = {
  code?: string(name='Code', example='OK'),
  httpStatusCode?: int32(name='HttpStatusCode', example='200'),
  message?: string(name='Message', example='Success'),
  requestId?: string(name='RequestId', example='254EB995-DEDF-48A4-9101-9CA5B72FFBCC'),
  schedulerInstances?: [ 
    {
      baseStrategy?: string(name='BaseStrategy', example='{}'),
      business?: string(name='Business', example='CLOUD_CODE_PUBLISHER'),
      instanceId?: string(name='InstanceId', example='254EB995-DEDF-48A4-9101-9CA5B72FFBCC'),
      maxConcurrency?: int32(name='MaxConcurrency', example='5'),
      ownerId?: string(name='OwnerId', example='234852938'),
    }
  ](name='SchedulerInstances'),
  success?: boolean(name='Success', example='true'),
}

model ListSchedulerInstancesResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: ListSchedulerInstancesResponseBody(name='body'),
}

/**
 * @param request ListSchedulerInstancesRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return ListSchedulerInstancesResponse
 */
async function listSchedulerInstancesWithOptions(request: ListSchedulerInstancesRequest, runtime: Util.RuntimeOptions): ListSchedulerInstancesResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.instanceOwnerId)) {
    query['InstanceOwnerId'] = request.instanceOwnerId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'ListSchedulerInstances',
    version = '2019-12-26',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @param request ListSchedulerInstancesRequest
 * @return ListSchedulerInstancesResponse
 */
async function listSchedulerInstances(request: ListSchedulerInstancesRequest): ListSchedulerInstancesResponse {
  var runtime = new Util.RuntimeOptions{};
  return listSchedulerInstancesWithOptions(request, runtime);
}

model ListScriptPublishHistoriesRequest {
  instanceId?: string(name='InstanceId', description='This parameter is required.', example='af81a389-91f0-4157-8d82-720edd02b66a'),
  pageNumber?: int32(name='PageNumber', description='This parameter is required.', example='1'),
  pageSize?: int32(name='PageSize', description='This parameter is required.', example='10'),
  scriptId?: string(name='ScriptId', description='This parameter is required.', example='b0f35dd1-0337-402e-9c4f-3a6c2426950a'),
}

model ListScriptPublishHistoriesResponseBody = {
  code?: string(name='Code', example='OK'),
  httpStatusCode?: int32(name='HttpStatusCode', example='200'),
  message?: string(name='Message', example='Success'),
  requestId?: string(name='RequestId', example='254EB995-DEDF-48A4-9101-9CA5B72FFBCC'),
  scriptPublishHistories?: {
    list?: [ 
      {
        description?: string(name='Description'),
        instanceId?: string(name='InstanceId', example='af81a389-91f0-4157-8d82-720edd02b66a'),
        publishTime?: long(name='PublishTime', example='1578965079000'),
        scriptId?: string(name='ScriptId', example='29420f65-8f1f-4009-b2f8-f4f7b5d59090'),
        scriptVersion?: string(name='ScriptVersion', example='1578965079000'),
      }
    ](name='List'),
    pageNumber?: int32(name='PageNumber', example='1'),
    pageSize?: int32(name='PageSize', example='10'),
    totalCount?: int32(name='TotalCount', example='100'),
  }(name='ScriptPublishHistories'),
  success?: boolean(name='Success', example='true'),
}

model ListScriptPublishHistoriesResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: ListScriptPublishHistoriesResponseBody(name='body'),
}

/**
 * @param request ListScriptPublishHistoriesRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return ListScriptPublishHistoriesResponse
 */
async function listScriptPublishHistoriesWithOptions(request: ListScriptPublishHistoriesRequest, runtime: Util.RuntimeOptions): ListScriptPublishHistoriesResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.instanceId)) {
    query['InstanceId'] = request.instanceId;
  }
  if (!Util.isUnset(request.pageNumber)) {
    query['PageNumber'] = request.pageNumber;
  }
  if (!Util.isUnset(request.pageSize)) {
    query['PageSize'] = request.pageSize;
  }
  if (!Util.isUnset(request.scriptId)) {
    query['ScriptId'] = request.scriptId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'ListScriptPublishHistories',
    version = '2019-12-26',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @param request ListScriptPublishHistoriesRequest
 * @return ListScriptPublishHistoriesResponse
 */
async function listScriptPublishHistories(request: ListScriptPublishHistoriesRequest): ListScriptPublishHistoriesResponse {
  var runtime = new Util.RuntimeOptions{};
  return listScriptPublishHistoriesWithOptions(request, runtime);
}

model ListScriptRecordingRequest {
  instanceId?: string(name='InstanceId', description='This parameter is required.', example='c209abb3-6804-4a75-b2c7-dd55c8c61b6a'),
  pageNumber?: int32(name='PageNumber', description='This parameter is required.', example='1'),
  pageSize?: int32(name='PageSize', description='This parameter is required.', example='10'),
  refIdsJson?: string(name='RefIdsJson'),
  scriptId?: string(name='ScriptId', description='This parameter is required.', example='d004cfd2-6a81-491c-83c6-cbe186620c95'),
  search?: string(name='Search'),
  statesJson?: string(name='StatesJson', example='[
     "8"
]'),
  uuidsJson?: string(name='UuidsJson', example='["d17d5bfa-4972-4389-9718-f9602edabe48"]'),
}

model ListScriptRecordingResponseBody = {
  code?: string(name='Code', example='OK'),
  httpStatusCode?: int32(name='HttpStatusCode', example='200'),
  message?: string(name='Message', example='Success'),
  pageNumber?: int32(name='PageNumber', example='1'),
  pageSize?: int32(name='PageSize', example='10'),
  requestId?: string(name='RequestId', example='254EB995-DEDF-48A4-9101-9CA5B72FFBCC'),
  scriptRecordings?: [ 
    {
      gmtCreate?: long(name='GmtCreate', example='2022-07-11T07:51:49.000+0000'),
      gmtModified?: long(name='GmtModified', example='1654601332000'),
      gmtUpload?: long(name='GmtUpload', example='1654601332000'),
      innerId?: string(name='InnerId', example='1'),
      instanceId?: string(name='InstanceId', example='ff0fb845-9f90-46d3-9716-d36b8a1e753a'),
      recordingContent?: string(name='RecordingContent'),
      recordingDuration?: int32(name='RecordingDuration', example='10'),
      recordingName?: string(name='RecordingName', example='hello.wav'),
      refId?: string(name='RefId'),
      scriptId?: string(name='ScriptId', example='6019b692-fd9e-4adb-8877-cef6a297b234'),
      state?: int32(name='State', example='8'),
      stateExtend?: string(name='StateExtend'),
      storageUuid?: string(name='StorageUuid', example='393674ed-3b5d-db44-0fda-615d05210178'),
      uuid?: string(name='Uuid', example='0a77386e-6402-8d23-4adf-6ec13b3f404d'),
    }
  ](name='ScriptRecordings'),
  success?: boolean(name='Success', example='true'),
  totalCount?: long(name='TotalCount', example='99'),
}

model ListScriptRecordingResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: ListScriptRecordingResponseBody(name='body'),
}

/**
 * @param request ListScriptRecordingRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return ListScriptRecordingResponse
 */
async function listScriptRecordingWithOptions(request: ListScriptRecordingRequest, runtime: Util.RuntimeOptions): ListScriptRecordingResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.instanceId)) {
    query['InstanceId'] = request.instanceId;
  }
  if (!Util.isUnset(request.pageNumber)) {
    query['PageNumber'] = request.pageNumber;
  }
  if (!Util.isUnset(request.pageSize)) {
    query['PageSize'] = request.pageSize;
  }
  if (!Util.isUnset(request.refIdsJson)) {
    query['RefIdsJson'] = request.refIdsJson;
  }
  if (!Util.isUnset(request.scriptId)) {
    query['ScriptId'] = request.scriptId;
  }
  if (!Util.isUnset(request.search)) {
    query['Search'] = request.search;
  }
  if (!Util.isUnset(request.statesJson)) {
    query['StatesJson'] = request.statesJson;
  }
  if (!Util.isUnset(request.uuidsJson)) {
    query['UuidsJson'] = request.uuidsJson;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'ListScriptRecording',
    version = '2019-12-26',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @param request ListScriptRecordingRequest
 * @return ListScriptRecordingResponse
 */
async function listScriptRecording(request: ListScriptRecordingRequest): ListScriptRecordingResponse {
  var runtime = new Util.RuntimeOptions{};
  return listScriptRecordingWithOptions(request, runtime);
}

model ListScriptVoiceConfigsRequest {
  instanceId?: string(name='InstanceId', description='This parameter is required.', example='af81a389-91f0-4157-8d82-720edd02b66a'),
  pageNumber?: int32(name='PageNumber', description='This parameter is required.', example='1'),
  pageSize?: int32(name='PageSize', description='This parameter is required.', example='20'),
  scriptId?: string(name='ScriptId', description='This parameter is required.', example='f95c7ca6-872c-4765-8493-165a8dfc682d'),
}

model ListScriptVoiceConfigsResponseBody = {
  code?: string(name='Code', example='OK'),
  httpStatusCode?: int32(name='HttpStatusCode', example='200'),
  message?: string(name='Message', example='Success'),
  requestId?: string(name='RequestId', example='254EB995-DEDF-48A4-9101-9CA5B72FFBCC'),
  scriptVoiceConfigs?: {
    list?: [ 
      {
        instanceId?: string(name='InstanceId', example='bdd49242-114c-4045-b1d1-25ccc1756c75'),
        scriptContent?: string(name='ScriptContent'),
        scriptId?: string(name='ScriptId', example='a7441a05-43bb-4a2d-acb0-365f245d7a5b'),
        scriptVoiceConfigId?: string(name='ScriptVoiceConfigId', example='2c8fa91f-9856-4145-90f2-08252f09bc18'),
        scriptWaveformRelation?: string(name='ScriptWaveformRelation', example='""'),
        source?: string(name='Source', example='DIALOGUE_FLOW'),
        type?: string(name='Type', example='TTS'),
      }
    ](name='List'),
    pageNumber?: int32(name='PageNumber', example='1'),
    pageSize?: int32(name='PageSize', example='10'),
    totalCount?: int32(name='TotalCount', example='100'),
  }(name='ScriptVoiceConfigs'),
  success?: boolean(name='Success', example='true'),
}

model ListScriptVoiceConfigsResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: ListScriptVoiceConfigsResponseBody(name='body'),
}

/**
 * @param request ListScriptVoiceConfigsRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return ListScriptVoiceConfigsResponse
 */
async function listScriptVoiceConfigsWithOptions(request: ListScriptVoiceConfigsRequest, runtime: Util.RuntimeOptions): ListScriptVoiceConfigsResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.instanceId)) {
    query['InstanceId'] = request.instanceId;
  }
  if (!Util.isUnset(request.pageNumber)) {
    query['PageNumber'] = request.pageNumber;
  }
  if (!Util.isUnset(request.pageSize)) {
    query['PageSize'] = request.pageSize;
  }
  if (!Util.isUnset(request.scriptId)) {
    query['ScriptId'] = request.scriptId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'ListScriptVoiceConfigs',
    version = '2019-12-26',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @param request ListScriptVoiceConfigsRequest
 * @return ListScriptVoiceConfigsResponse
 */
async function listScriptVoiceConfigs(request: ListScriptVoiceConfigsRequest): ListScriptVoiceConfigsResponse {
  var runtime = new Util.RuntimeOptions{};
  return listScriptVoiceConfigsWithOptions(request, runtime);
}

model ListScriptsRequest {
  instanceId?: string(name='InstanceId', description='This parameter is required.', example='bdd49242-114c-4045-b1d1-25ccc1756c75'),
  nluEngine?: string(name='NluEngine'),
  pageNumber?: int32(name='PageNumber', description='This parameter is required.', example='1'),
  pageSize?: int32(name='PageSize', description='This parameter is required.', example='10'),
  scriptName?: string(name='ScriptName'),
}

model ListScriptsResponseBody = {
  code?: string(name='Code', example='OK'),
  httpStatusCode?: int32(name='HttpStatusCode', example='200'),
  message?: string(name='Message', example='Success'),
  requestId?: string(name='RequestId', example='254EB995-DEDF-48A4-9101-9CA5B72FFBCC'),
  scripts?: {
    list?: [ 
      {
        agentKey?: string(name='AgentKey'),
        agentLlm?: boolean(name='AgentLlm'),
        createTime?: long(name='CreateTime'),
        debugStatus?: string(name='DebugStatus', example='DRAFTED'),
        emotionEnable?: boolean(name='EmotionEnable', example='false'),
        industry?: string(name='Industry'),
        isDebugDrafted?: boolean(name='IsDebugDrafted', example='true'),
        isDrafted?: boolean(name='IsDrafted', example='true'),
        isPreset?: boolean(name='IsPreset', example='false'),
        longWaitEnable?: boolean(name='LongWaitEnable', example='false'),
        miniPlaybackEnable?: boolean(name='MiniPlaybackEnable', example='false'),
        newBargeInEnable?: boolean(name='NewBargeInEnable', example='false'),
        nluAccessType?: string(name='NluAccessType'),
        nluEngine?: string(name='NluEngine'),
        nluProfile?: {
          fcFunction?: string(name='FcFunction'),
          fcHttpTriggerUrl?: string(name='FcHttpTriggerUrl'),
          fcRegion?: string(name='FcRegion'),
        }(name='NluProfile'),
        rejectReason?: string(name='RejectReason'),
        scene?: string(name='Scene'),
        scriptDescription?: string(name='ScriptDescription'),
        scriptId?: string(name='ScriptId', example='8d6a6e41-8093-49af-a9d1-0281878758ac'),
        scriptName?: string(name='ScriptName'),
        status?: string(name='Status', example='DRAFTED'),
        updateTime?: long(name='UpdateTime', example='1578965079000'),
        agentId?: long(name='agentId'),
      }
    ](name='List'),
    pageNumber?: int32(name='PageNumber', example='1'),
    pageSize?: int32(name='PageSize', example='10'),
    totalCount?: int32(name='TotalCount', example='15'),
  }(name='Scripts'),
  success?: boolean(name='Success', example='true'),
}

model ListScriptsResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: ListScriptsResponseBody(name='body'),
}

/**
 * @summary -
 *
 * @param request ListScriptsRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return ListScriptsResponse
 */
async function listScriptsWithOptions(request: ListScriptsRequest, runtime: Util.RuntimeOptions): ListScriptsResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.instanceId)) {
    query['InstanceId'] = request.instanceId;
  }
  if (!Util.isUnset(request.nluEngine)) {
    query['NluEngine'] = request.nluEngine;
  }
  if (!Util.isUnset(request.pageNumber)) {
    query['PageNumber'] = request.pageNumber;
  }
  if (!Util.isUnset(request.pageSize)) {
    query['PageSize'] = request.pageSize;
  }
  if (!Util.isUnset(request.scriptName)) {
    query['ScriptName'] = request.scriptName;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'ListScripts',
    version = '2019-12-26',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary -
 *
 * @param request ListScriptsRequest
 * @return ListScriptsResponse
 */
async function listScripts(request: ListScriptsRequest): ListScriptsResponse {
  var runtime = new Util.RuntimeOptions{};
  return listScriptsWithOptions(request, runtime);
}

model ListTagResourcesRequest {
  nextToken?: string(name='NextToken', example='b949ae1f-01dc-4191-ae5a-70fbe6772fd8'),
  regionId?: string(name='RegionId', description='This parameter is required.', example='cn-shanghai'),
  resourceId?: [ string ](name='ResourceId', example='ResourceId.1=b949ae1f-01dc-4191-ae5a-70fbe6772fd8'),
  resourceType?: string(name='ResourceType', description='This parameter is required.', example='instance'),
  tag?: [ 
    {
      key?: string(name='Key', example='Tag.1.Key=key1'),
      value?: string(name='Value', example='Tag.1.Value=value1'),
    }
  ](name='Tag'),
}

model ListTagResourcesResponseBody = {
  code?: string(name='Code', example='OK'),
  httpStatusCode?: int32(name='HttpStatusCode', example='200'),
  message?: string(name='Message', example='Success'),
  nextToken?: string(name='NextToken', example='b949ae1f-01dc-4191-ae5a-70fbe6772fd8'),
  requestId?: string(name='RequestId', example='254EB995-DEDF-48A4-9101-9CA5B72FFBCC'),
  success?: boolean(name='Success', example='true'),
  tagResources?: [ 
    {
      resourceId?: string(name='ResourceId', example='b949ae1f-01dc-4191-ae5a-70fbe6772fd8'),
      resourceType?: string(name='ResourceType', example='instance'),
      tagKey?: string(name='TagKey', example='key1'),
      tagValue?: string(name='TagValue', example='value1'),
    }
  ](name='TagResources'),
}

model ListTagResourcesResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: ListTagResourcesResponseBody(name='body'),
}

/**
 * @param request ListTagResourcesRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return ListTagResourcesResponse
 */
async function listTagResourcesWithOptions(request: ListTagResourcesRequest, runtime: Util.RuntimeOptions): ListTagResourcesResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.nextToken)) {
    query['NextToken'] = request.nextToken;
  }
  if (!Util.isUnset(request.regionId)) {
    query['RegionId'] = request.regionId;
  }
  if (!Util.isUnset(request.resourceId)) {
    query['ResourceId'] = request.resourceId;
  }
  if (!Util.isUnset(request.resourceType)) {
    query['ResourceType'] = request.resourceType;
  }
  if (!Util.isUnset(request.tag)) {
    query['Tag'] = request.tag;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'ListTagResources',
    version = '2019-12-26',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @param request ListTagResourcesRequest
 * @return ListTagResourcesResponse
 */
async function listTagResources(request: ListTagResourcesRequest): ListTagResourcesResponse {
  var runtime = new Util.RuntimeOptions{};
  return listTagResourcesWithOptions(request, runtime);
}

model ListTagsRequest {
  instanceId?: string(name='InstanceId', description='This parameter is required.', example='8fa1953f-4a84-46d8-b80c-8ce9cf684fb3'),
  scriptId?: string(name='ScriptId', description='This parameter is required.', example='8a4c6d3d-5ed6-44ca-b779-16c20f8862be'),
}

model ListTagsResponseBody = {
  code?: string(name='Code', example='OK'),
  httpStatusCode?: int32(name='HttpStatusCode', example='200'),
  message?: string(name='Message', example='Success'),
  requestId?: string(name='RequestId', example='254EB995-DEDF-48A4-9101-9CA5B72FFBCC'),
  success?: boolean(name='Success', example='true'),
  tagGroups?: [ 
    {
      scriptId?: string(name='ScriptId', example='8a4c6d3d-5ed6-44ca-b779-16c20f8862be'),
      tagGroup?: string(name='TagGroup'),
      tagGroupId?: string(name='TagGroupId', example='38c03261-9fe8-4b9b-8c3b-983a60319012'),
      tagGroupIndex?: int32(name='TagGroupIndex', example='1'),
    }
  ](name='TagGroups'),
  tags?: [ 
    {
      scriptId?: string(name='ScriptId', example='8a4c6d3d-5ed6-44ca-b779-16c20f8862be'),
      tagGroup?: string(name='TagGroup'),
      tagId?: string(name='TagId', example='d62be647-6202-4b1f-9708-0baeec552635'),
      tagIndex?: int32(name='TagIndex', example='1'),
      tagName?: string(name='TagName'),
    }
  ](name='Tags'),
}

model ListTagsResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: ListTagsResponseBody(name='body'),
}

/**
 * @param request ListTagsRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return ListTagsResponse
 */
async function listTagsWithOptions(request: ListTagsRequest, runtime: Util.RuntimeOptions): ListTagsResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.instanceId)) {
    query['InstanceId'] = request.instanceId;
  }
  if (!Util.isUnset(request.scriptId)) {
    query['ScriptId'] = request.scriptId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'ListTags',
    version = '2019-12-26',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @param request ListTagsRequest
 * @return ListTagsResponse
 */
async function listTags(request: ListTagsRequest): ListTagsResponse {
  var runtime = new Util.RuntimeOptions{};
  return listTagsWithOptions(request, runtime);
}

model ModifyAgentProfileRequest {
  agentProfileId?: string(name='AgentProfileId', description='This parameter is required.', example='37ca3ca1ac4b4e57adf3da5b5d939d04'),
  apiPluginJson?: string(name='ApiPluginJson', example='[]'),
  description?: string(name='Description'),
  faqCategoryIds?: [ long ](name='FaqCategoryIds'),
  instanceId?: string(name='InstanceId', description='This parameter is required.', example='174952ab-9825-4cc9-a5e2-de82d7fa4cdd'),
  instructionJson?: string(name='InstructionJson', example='[{"type":"TransferToAgent","instructions":[{"code":"Transfer0","skillGroupId":"123","skillGroupName":"123"}],"timeoutEnable":false},{"type":"CollectNumber","instructions":[]}]'),
  labelsJson?: string(name='LabelsJson'),
  model?: string(name='Model', example='model_001'),
  modelConfig?: string(name='ModelConfig', example='{}'),
  prompt?: string(name='Prompt'),
  promptJson?: string(name='PromptJson'),
  scenario?: string(name='Scenario'),
  variablesJson?: string(name='VariablesJson'),
}

model ModifyAgentProfileShrinkRequest {
  agentProfileId?: string(name='AgentProfileId', description='This parameter is required.', example='37ca3ca1ac4b4e57adf3da5b5d939d04'),
  apiPluginJson?: string(name='ApiPluginJson', example='[]'),
  description?: string(name='Description'),
  faqCategoryIdsShrink?: string(name='FaqCategoryIds'),
  instanceId?: string(name='InstanceId', description='This parameter is required.', example='174952ab-9825-4cc9-a5e2-de82d7fa4cdd'),
  instructionJson?: string(name='InstructionJson', example='[{"type":"TransferToAgent","instructions":[{"code":"Transfer0","skillGroupId":"123","skillGroupName":"123"}],"timeoutEnable":false},{"type":"CollectNumber","instructions":[]}]'),
  labelsJson?: string(name='LabelsJson'),
  model?: string(name='Model', example='model_001'),
  modelConfig?: string(name='ModelConfig', example='{}'),
  prompt?: string(name='Prompt'),
  promptJson?: string(name='PromptJson'),
  scenario?: string(name='Scenario'),
  variablesJson?: string(name='VariablesJson'),
}

model ModifyAgentProfileResponseBody = {
  code?: string(name='Code', example='OK'),
  data?: {
    agentProfileId?: string(name='AgentProfileId', example='3d7d253cfb77476da0cf3681bcf7b4e8'),
    agentProfileTemplateId?: string(name='AgentProfileTemplateId', description='agent template id', example='default-survey'),
    agentType?: string(name='AgentType', description='agent type', example='Human'),
    apiPluginJson?: string(name='ApiPluginJson', example='[]'),
    createTime?: string(name='CreateTime', example='1721356124220'),
    description?: string(name='Description'),
    instanceId?: string(name='InstanceId', example='788066f2-f160-458e-a3bb-83e1c9d5606d'),
    instructionJson?: string(name='InstructionJson', example='[{"type":"TransferToAgent","instructions":[{"code":"Transfer0","skillGroupId":"123","skillGroupName":"123"}],"timeoutEnable":false},{"type":"CollectNumber","instructions":[]}]'),
    labelsJson?: string(name='LabelsJson'),
    model?: string(name='Model', example='model_002'),
    modelConfig?: string(name='ModelConfig', example='""'),
    nluConfigJson?: string(name='NluConfigJson', example='{"chatbotInstanceId":"chatbot-cn-j7eiVJZRmb","faqCategoryIds":[30000474726],"llmAgentId":"1246206","llmAgentInstanceId":"outbound_05efb75a-95df-438e-9b9b-8f2c857d5498","llmAgentKey":"d682716514814815ae77757c0bcbda01_p_outbound_public"}'),
    prompt?: string(name='Prompt'),
    promptJson?: string(name='PromptJson'),
    scenario?: string(name='Scenario', example='default'),
    scriptId?: string(name='ScriptId', example='3eacaec0-64ba-4008-9392-1d419b0d2673'),
    system?: boolean(name='System', example='true'),
    updateTime?: string(name='UpdateTime', example='1715416630.0'),
    variablesJson?: string(name='VariablesJson'),
  }(name='Data'),
  httpStatusCode?: int32(name='HttpStatusCode', example='200'),
  message?: string(name='Message', example='Success'),
  requestId?: string(name='RequestId', example='254EB995-DEDF-48A4-9101-9CA5B72FFBCC'),
  success?: boolean(name='Success', example='true'),
}

model ModifyAgentProfileResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: ModifyAgentProfileResponseBody(name='body'),
}

/**
 * @param tmpReq ModifyAgentProfileRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return ModifyAgentProfileResponse
 */
async function modifyAgentProfileWithOptions(tmpReq: ModifyAgentProfileRequest, runtime: Util.RuntimeOptions): ModifyAgentProfileResponse {
  Util.validateModel(tmpReq);
  var request = new ModifyAgentProfileShrinkRequest{};
  OpenApiUtil.convert(tmpReq, request);
  if (!Util.isUnset(tmpReq.faqCategoryIds)) {
    request.faqCategoryIdsShrink = OpenApiUtil.arrayToStringWithSpecifiedStyle(tmpReq.faqCategoryIds, 'FaqCategoryIds', 'json');
  }
  var body : map[string]any = {};
  if (!Util.isUnset(request.agentProfileId)) {
    body['AgentProfileId'] = request.agentProfileId;
  }
  if (!Util.isUnset(request.apiPluginJson)) {
    body['ApiPluginJson'] = request.apiPluginJson;
  }
  if (!Util.isUnset(request.description)) {
    body['Description'] = request.description;
  }
  if (!Util.isUnset(request.faqCategoryIdsShrink)) {
    body['FaqCategoryIds'] = request.faqCategoryIdsShrink;
  }
  if (!Util.isUnset(request.instanceId)) {
    body['InstanceId'] = request.instanceId;
  }
  if (!Util.isUnset(request.instructionJson)) {
    body['InstructionJson'] = request.instructionJson;
  }
  if (!Util.isUnset(request.labelsJson)) {
    body['LabelsJson'] = request.labelsJson;
  }
  if (!Util.isUnset(request.model)) {
    body['Model'] = request.model;
  }
  if (!Util.isUnset(request.modelConfig)) {
    body['ModelConfig'] = request.modelConfig;
  }
  if (!Util.isUnset(request.prompt)) {
    body['Prompt'] = request.prompt;
  }
  if (!Util.isUnset(request.promptJson)) {
    body['PromptJson'] = request.promptJson;
  }
  if (!Util.isUnset(request.scenario)) {
    body['Scenario'] = request.scenario;
  }
  if (!Util.isUnset(request.variablesJson)) {
    body['VariablesJson'] = request.variablesJson;
  }
  var req = new OpenApi.OpenApiRequest{ 
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'ModifyAgentProfile',
    version = '2019-12-26',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @param request ModifyAgentProfileRequest
 * @return ModifyAgentProfileResponse
 */
async function modifyAgentProfile(request: ModifyAgentProfileRequest): ModifyAgentProfileResponse {
  var runtime = new Util.RuntimeOptions{};
  return modifyAgentProfileWithOptions(request, runtime);
}

model ModifyAnnotationMissionRequest {
  annotationMissionId?: string(name='AnnotationMissionId', example='c88cc004-de69-4eee-aa5f-2efed533a54e'),
  annotationMissionName?: string(name='AnnotationMissionName'),
  annotationStatus?: int32(name='AnnotationStatus', example='2'),
  delete?: boolean(name='Delete', example='false'),
}

model ModifyAnnotationMissionResponseBody = {
  code?: string(name='Code', example='OK'),
  data?: {
    message?: string(name='Message', example='The operation is not allowed. User state (DIALING) does not meet expectations (READY).'),
    success?: boolean(name='Success', example='true'),
  }(name='Data'),
  httpStatusCode?: int32(name='HttpStatusCode', example='200'),
  message?: string(name='Message', example='The operation is not allowed. User state (DIALING) does not meet expectations (READY).'),
  requestId?: string(name='RequestId', example='254EB995-DEDF-48A4-9101-9CA5B72FFBCC'),
  success?: boolean(name='Success', example='true'),
}

model ModifyAnnotationMissionResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: ModifyAnnotationMissionResponseBody(name='body'),
}

/**
 * @param request ModifyAnnotationMissionRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return ModifyAnnotationMissionResponse
 */
async function modifyAnnotationMissionWithOptions(request: ModifyAnnotationMissionRequest, runtime: Util.RuntimeOptions): ModifyAnnotationMissionResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.annotationMissionId)) {
    query['AnnotationMissionId'] = request.annotationMissionId;
  }
  if (!Util.isUnset(request.annotationMissionName)) {
    query['AnnotationMissionName'] = request.annotationMissionName;
  }
  if (!Util.isUnset(request.annotationStatus)) {
    query['AnnotationStatus'] = request.annotationStatus;
  }
  if (!Util.isUnset(request.delete)) {
    query['Delete'] = request.delete;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'ModifyAnnotationMission',
    version = '2019-12-26',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @param request ModifyAnnotationMissionRequest
 * @return ModifyAnnotationMissionResponse
 */
async function modifyAnnotationMission(request: ModifyAnnotationMissionRequest): ModifyAnnotationMissionResponse {
  var runtime = new Util.RuntimeOptions{};
  return modifyAnnotationMissionWithOptions(request, runtime);
}

model ModifyBatchJobsRequest {
  batchJobName?: string(name='BatchJobName', description='This parameter is required.'),
  callingNumber?: [ string ](name='CallingNumber', example='["95187"]'),
  description?: string(name='Description'),
  instanceId?: string(name='InstanceId', description='This parameter is required.', example='174952ab-9825-4cc9-a5e2-de82d7fa4cdd'),
  jobFilePath?: string(name='JobFilePath', example='52e80b02-0126-4556-a1e6-ef5b3747ed53/a9a3ddc7-d7d7-48cd-82b5-b31bb5510e71_2a66f8ad-dfbb-4980-9b84-439171295a11.xlsx'),
  jobGroupId?: string(name='JobGroupId', description='This parameter is required.', example='c6a668d1-3145-4048-9101-cb3678bb8884'),
  scenarioId?: string(name='ScenarioId', example='c6a668d1-3145-4048-9101-cb3678bb8884'),
  scriptId?: string(name='ScriptId', example='7d820242-f4f0-4d2e-ae35-b424c41cbc5b'),
  strategyJson?: string(name='StrategyJson'),
  submitted?: boolean(name='Submitted', description='This parameter is required.', example='false'),
}

model ModifyBatchJobsResponseBody = {
  code?: string(name='Code', example='OK'),
  httpStatusCode?: int32(name='HttpStatusCode', example='200'),
  jobGroup?: {
    callingNumbers?: [ string ](name='CallingNumbers'),
    creationTime?: long(name='CreationTime', example='1579068424000'),
    jobFilePath?: string(name='JobFilePath', example='52e80b02-0126-4556-a1e6-ef5b3747ed53/a9a3ddc7-d7d7-48cd-82b5-b31bb5510e71_2a66f8ad-dfbb-4980-9b84-439171295a11.xlsx'),
    jobGroupDescription?: string(name='JobGroupDescription'),
    jobGroupId?: string(name='JobGroupId', example='5a7e8b09-baf9-4cab-b540-c971f47a7146'),
    jobGroupName?: string(name='JobGroupName'),
    scenarioId?: string(name='ScenarioId', example='6cea9bed-63e6-439e-ae4c-b3333efff53d'),
    strategy?: {
      customized?: string(name='Customized', example='{}'),
      endTime?: long(name='EndTime', example='2209702074000'),
      followUpStrategy?: string(name='FollowUpStrategy', example='CONTINUE'),
      isTemplate?: boolean(name='IsTemplate', example='false'),
      maxAttemptsPerDay?: int32(name='MaxAttemptsPerDay', example='3'),
      minAttemptInterval?: int32(name='MinAttemptInterval', example='10'),
      repeatBy?: string(name='RepeatBy', example='Once'),
      repeatDays?: [ string ](name='RepeatDays'),
      routingStrategy?: string(name='RoutingStrategy', example='LocalFirst'),
      startTime?: long(name='StartTime', example='1578550074000'),
      strategyDescription?: string(name='StrategyDescription'),
      strategyId?: string(name='StrategyId', example='f718798d-96be-40e4-bef6-317b54855708'),
      strategyName?: string(name='StrategyName'),
      type?: string(name='Type', example='Repeatable'),
      workingTime?: [ 
        {
          beginTime?: string(name='BeginTime', example='1581937093000'),
          endTime?: string(name='EndTime', example='1581997093000'),
        }
      ](name='WorkingTime'),
    }(name='Strategy'),
  }(name='JobGroup'),
  message?: string(name='Message', example='Success'),
  requestId?: string(name='RequestId', example='254EB995-DEDF-48A4-9101-9CA5B72FFBCC'),
  success?: boolean(name='Success', example='true'),
}

model ModifyBatchJobsResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: ModifyBatchJobsResponseBody(name='body'),
}

/**
 * @param request ModifyBatchJobsRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return ModifyBatchJobsResponse
 */
async function modifyBatchJobsWithOptions(request: ModifyBatchJobsRequest, runtime: Util.RuntimeOptions): ModifyBatchJobsResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.batchJobName)) {
    query['BatchJobName'] = request.batchJobName;
  }
  if (!Util.isUnset(request.callingNumber)) {
    query['CallingNumber'] = request.callingNumber;
  }
  if (!Util.isUnset(request.description)) {
    query['Description'] = request.description;
  }
  if (!Util.isUnset(request.instanceId)) {
    query['InstanceId'] = request.instanceId;
  }
  if (!Util.isUnset(request.jobFilePath)) {
    query['JobFilePath'] = request.jobFilePath;
  }
  if (!Util.isUnset(request.jobGroupId)) {
    query['JobGroupId'] = request.jobGroupId;
  }
  if (!Util.isUnset(request.scenarioId)) {
    query['ScenarioId'] = request.scenarioId;
  }
  if (!Util.isUnset(request.scriptId)) {
    query['ScriptId'] = request.scriptId;
  }
  if (!Util.isUnset(request.strategyJson)) {
    query['StrategyJson'] = request.strategyJson;
  }
  if (!Util.isUnset(request.submitted)) {
    query['Submitted'] = request.submitted;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'ModifyBatchJobs',
    version = '2019-12-26',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @param request ModifyBatchJobsRequest
 * @return ModifyBatchJobsResponse
 */
async function modifyBatchJobs(request: ModifyBatchJobsRequest): ModifyBatchJobsResponse {
  var runtime = new Util.RuntimeOptions{};
  return modifyBatchJobsWithOptions(request, runtime);
}

model ModifyBeebotIntentRequest {
  instanceId?: string(name='InstanceId', description='This parameter is required.', example='e5035654-1745-484a-8c5b-165f7c7bcd79'),
  intentDefinition?: {
    aliasName?: string(name='AliasName'),
    intentName?: string(name='IntentName', description='This parameter is required.'),
  }(name='IntentDefinition', description='This parameter is required.'),
  intentId?: long(name='IntentId', description='This parameter is required.', example='10717802'),
  scriptId?: string(name='ScriptId', description='This parameter is required.', example='c5c5d8c0-c0f1-48a7-be2b-dc46006d888a'),
}

model ModifyBeebotIntentShrinkRequest {
  instanceId?: string(name='InstanceId', description='This parameter is required.', example='e5035654-1745-484a-8c5b-165f7c7bcd79'),
  intentDefinitionShrink?: string(name='IntentDefinition', description='This parameter is required.'),
  intentId?: long(name='IntentId', description='This parameter is required.', example='10717802'),
  scriptId?: string(name='ScriptId', description='This parameter is required.', example='c5c5d8c0-c0f1-48a7-be2b-dc46006d888a'),
}

model ModifyBeebotIntentResponseBody = {
  beebotRequestId?: string(name='BeebotRequestId', example='A1F21BF2-CB21-1968-8039-C74699E7DDEB'),
  code?: string(name='Code', example='OK'),
  httpStatusCode?: int32(name='HttpStatusCode', example='200'),
  intentId?: long(name='IntentId', example='10717802'),
  message?: string(name='Message', example='Success'),
  requestId?: string(name='RequestId', example='8785D26A-7406-50A1-9653-1313C292E23B'),
  success?: boolean(name='Success', example='true'),
}

model ModifyBeebotIntentResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: ModifyBeebotIntentResponseBody(name='body'),
}

/**
 * @summary ModifyBeebotIntent
 *
 * @param tmpReq ModifyBeebotIntentRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return ModifyBeebotIntentResponse
 */
async function modifyBeebotIntentWithOptions(tmpReq: ModifyBeebotIntentRequest, runtime: Util.RuntimeOptions): ModifyBeebotIntentResponse {
  Util.validateModel(tmpReq);
  var request = new ModifyBeebotIntentShrinkRequest{};
  OpenApiUtil.convert(tmpReq, request);
  if (!Util.isUnset(tmpReq.intentDefinition)) {
    request.intentDefinitionShrink = OpenApiUtil.arrayToStringWithSpecifiedStyle(tmpReq.intentDefinition, 'IntentDefinition', 'json');
  }
  var query = {};
  if (!Util.isUnset(request.instanceId)) {
    query['InstanceId'] = request.instanceId;
  }
  if (!Util.isUnset(request.intentDefinitionShrink)) {
    query['IntentDefinition'] = request.intentDefinitionShrink;
  }
  if (!Util.isUnset(request.intentId)) {
    query['IntentId'] = request.intentId;
  }
  if (!Util.isUnset(request.scriptId)) {
    query['ScriptId'] = request.scriptId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'ModifyBeebotIntent',
    version = '2019-12-26',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary ModifyBeebotIntent
 *
 * @param request ModifyBeebotIntentRequest
 * @return ModifyBeebotIntentResponse
 */
async function modifyBeebotIntent(request: ModifyBeebotIntentRequest): ModifyBeebotIntentResponse {
  var runtime = new Util.RuntimeOptions{};
  return modifyBeebotIntentWithOptions(request, runtime);
}

model ModifyBeebotIntentLgfRequest {
  instanceId?: string(name='InstanceId', description='This parameter is required.', example='e5035654-1745-484a-8c5b-165f7c7bcd79'),
  lgfDefinition?: {
    intentId?: long(name='IntentId', description='This parameter is required.', example='10717802'),
    ruleText?: string(name='RuleText', description='This parameter is required.'),
  }(name='LgfDefinition', description='This parameter is required.'),
  lgfId?: long(name='LgfId', description='This parameter is required.', example='5666117'),
  scriptId?: string(name='ScriptId', description='This parameter is required.', example='c5c5d8c0-c0f1-48a7-be2b-dc46006d888a'),
}

model ModifyBeebotIntentLgfShrinkRequest {
  instanceId?: string(name='InstanceId', description='This parameter is required.', example='e5035654-1745-484a-8c5b-165f7c7bcd79'),
  lgfDefinitionShrink?: string(name='LgfDefinition', description='This parameter is required.'),
  lgfId?: long(name='LgfId', description='This parameter is required.', example='5666117'),
  scriptId?: string(name='ScriptId', description='This parameter is required.', example='c5c5d8c0-c0f1-48a7-be2b-dc46006d888a'),
}

model ModifyBeebotIntentLgfResponseBody = {
  beebotRequestId?: string(name='BeebotRequestId', example='A1F21BF2-CB21-1968-8039-C74699E7DDEB'),
  code?: string(name='Code', example='OK'),
  httpStatusCode?: int32(name='HttpStatusCode', example='200'),
  lgfId?: long(name='LgfId', example='5666117'),
  message?: string(name='Message', example='Success'),
  requestId?: string(name='RequestId', example='302C67BD-19FF-5B66-A45D-F95544604155'),
  success?: boolean(name='Success', example='true'),
}

model ModifyBeebotIntentLgfResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: ModifyBeebotIntentLgfResponseBody(name='body'),
}

/**
 * @summary ModifyBeebotIntentLgf
 *
 * @param tmpReq ModifyBeebotIntentLgfRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return ModifyBeebotIntentLgfResponse
 */
async function modifyBeebotIntentLgfWithOptions(tmpReq: ModifyBeebotIntentLgfRequest, runtime: Util.RuntimeOptions): ModifyBeebotIntentLgfResponse {
  Util.validateModel(tmpReq);
  var request = new ModifyBeebotIntentLgfShrinkRequest{};
  OpenApiUtil.convert(tmpReq, request);
  if (!Util.isUnset(tmpReq.lgfDefinition)) {
    request.lgfDefinitionShrink = OpenApiUtil.arrayToStringWithSpecifiedStyle(tmpReq.lgfDefinition, 'LgfDefinition', 'json');
  }
  var query = {};
  if (!Util.isUnset(request.instanceId)) {
    query['InstanceId'] = request.instanceId;
  }
  if (!Util.isUnset(request.lgfDefinitionShrink)) {
    query['LgfDefinition'] = request.lgfDefinitionShrink;
  }
  if (!Util.isUnset(request.lgfId)) {
    query['LgfId'] = request.lgfId;
  }
  if (!Util.isUnset(request.scriptId)) {
    query['ScriptId'] = request.scriptId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'ModifyBeebotIntentLgf',
    version = '2019-12-26',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary ModifyBeebotIntentLgf
 *
 * @param request ModifyBeebotIntentLgfRequest
 * @return ModifyBeebotIntentLgfResponse
 */
async function modifyBeebotIntentLgf(request: ModifyBeebotIntentLgfRequest): ModifyBeebotIntentLgfResponse {
  var runtime = new Util.RuntimeOptions{};
  return modifyBeebotIntentLgfWithOptions(request, runtime);
}

model ModifyBeebotIntentUserSayRequest {
  instanceId?: string(name='InstanceId', description='This parameter is required.', example='e5035654-1745-484a-8c5b-165f7c7bcd79'),
  scriptId?: string(name='ScriptId', description='This parameter is required.', example='c5c5d8c0-c0f1-48a7-be2b-dc46006d888a'),
  userSayDefinition?: {
    content?: string(name='Content', description='This parameter is required.'),
    intentId?: long(name='IntentId', description='This parameter is required.', example='10717802'),
  }(name='UserSayDefinition', description='This parameter is required.'),
  userSayId?: string(name='UserSayId', description='This parameter is required.', example='17448458'),
}

model ModifyBeebotIntentUserSayShrinkRequest {
  instanceId?: string(name='InstanceId', description='This parameter is required.', example='e5035654-1745-484a-8c5b-165f7c7bcd79'),
  scriptId?: string(name='ScriptId', description='This parameter is required.', example='c5c5d8c0-c0f1-48a7-be2b-dc46006d888a'),
  userSayDefinitionShrink?: string(name='UserSayDefinition', description='This parameter is required.'),
  userSayId?: string(name='UserSayId', description='This parameter is required.', example='17448458'),
}

model ModifyBeebotIntentUserSayResponseBody = {
  beebotRequestId?: string(name='BeebotRequestId', example='A1F21BF2-CB21-1968-8039-C74699E7DDEB'),
  code?: string(name='Code', example='OK'),
  httpStatusCode?: int32(name='HttpStatusCode', example='200'),
  message?: string(name='Message', example='Success'),
  requestId?: string(name='RequestId', example='Success'),
  success?: boolean(name='Success', example='true'),
  userSayId?: long(name='UserSayId', example='17448458'),
}

model ModifyBeebotIntentUserSayResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: ModifyBeebotIntentUserSayResponseBody(name='body'),
}

/**
 * @summary ModifyBeebotIntentUserSay
 *
 * @param tmpReq ModifyBeebotIntentUserSayRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return ModifyBeebotIntentUserSayResponse
 */
async function modifyBeebotIntentUserSayWithOptions(tmpReq: ModifyBeebotIntentUserSayRequest, runtime: Util.RuntimeOptions): ModifyBeebotIntentUserSayResponse {
  Util.validateModel(tmpReq);
  var request = new ModifyBeebotIntentUserSayShrinkRequest{};
  OpenApiUtil.convert(tmpReq, request);
  if (!Util.isUnset(tmpReq.userSayDefinition)) {
    request.userSayDefinitionShrink = OpenApiUtil.arrayToStringWithSpecifiedStyle(tmpReq.userSayDefinition, 'UserSayDefinition', 'json');
  }
  var query = {};
  if (!Util.isUnset(request.instanceId)) {
    query['InstanceId'] = request.instanceId;
  }
  if (!Util.isUnset(request.scriptId)) {
    query['ScriptId'] = request.scriptId;
  }
  if (!Util.isUnset(request.userSayDefinitionShrink)) {
    query['UserSayDefinition'] = request.userSayDefinitionShrink;
  }
  if (!Util.isUnset(request.userSayId)) {
    query['UserSayId'] = request.userSayId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'ModifyBeebotIntentUserSay',
    version = '2019-12-26',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary ModifyBeebotIntentUserSay
 *
 * @param request ModifyBeebotIntentUserSayRequest
 * @return ModifyBeebotIntentUserSayResponse
 */
async function modifyBeebotIntentUserSay(request: ModifyBeebotIntentUserSayRequest): ModifyBeebotIntentUserSayResponse {
  var runtime = new Util.RuntimeOptions{};
  return modifyBeebotIntentUserSayWithOptions(request, runtime);
}

model ModifyDialogueFlowRequest {
  dialogueFlowDefinition?: string(name='DialogueFlowDefinition', description='This parameter is required.'),
  dialogueFlowId?: string(name='DialogueFlowId', description='This parameter is required.', example='390515b5-6115-4ccf-83e2-52d5bfaf2ddf'),
  instanceId?: string(name='InstanceId', description='This parameter is required.', example='da37319b-6c83-4268-9f19-814aed62e401'),
  isDrafted?: boolean(name='IsDrafted', example='true'),
  scriptId?: string(name='ScriptId', description='This parameter is required.', example='b0f35dd1-0337-402e-9c4f-3a6c2426950a'),
}

model ModifyDialogueFlowResponseBody = {
  code?: string(name='Code', example='OK'),
  dialogueFlowDefinition?: string(name='DialogueFlowDefinition'),
  dialogueFlowId?: string(name='DialogueFlowId', example='390515b5-6115-4ccf-83e2-52d5bfaf2ddf'),
  httpStatusCode?: int32(name='HttpStatusCode', example='200'),
  message?: string(name='Message', example='Succcess'),
  requestId?: string(name='RequestId', example='254EB995-DEDF-48A4-9101-9CA5B72FFBCC'),
  success?: boolean(name='Success', example='true'),
}

model ModifyDialogueFlowResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: ModifyDialogueFlowResponseBody(name='body'),
}

/**
 * @param request ModifyDialogueFlowRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return ModifyDialogueFlowResponse
 */
async function modifyDialogueFlowWithOptions(request: ModifyDialogueFlowRequest, runtime: Util.RuntimeOptions): ModifyDialogueFlowResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.dialogueFlowDefinition)) {
    query['DialogueFlowDefinition'] = request.dialogueFlowDefinition;
  }
  if (!Util.isUnset(request.dialogueFlowId)) {
    query['DialogueFlowId'] = request.dialogueFlowId;
  }
  if (!Util.isUnset(request.instanceId)) {
    query['InstanceId'] = request.instanceId;
  }
  if (!Util.isUnset(request.isDrafted)) {
    query['IsDrafted'] = request.isDrafted;
  }
  if (!Util.isUnset(request.scriptId)) {
    query['ScriptId'] = request.scriptId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'ModifyDialogueFlow',
    version = '2019-12-26',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @param request ModifyDialogueFlowRequest
 * @return ModifyDialogueFlowResponse
 */
async function modifyDialogueFlow(request: ModifyDialogueFlowRequest): ModifyDialogueFlowResponse {
  var runtime = new Util.RuntimeOptions{};
  return modifyDialogueFlowWithOptions(request, runtime);
}

model ModifyEmptyNumberNoMoreCallsInfoRequest {
  emptyNumberNoMoreCalls?: boolean(name='EmptyNumberNoMoreCalls', example='true'),
  entryId?: string(name='EntryId', description='This parameter is required.', example='6cc9f5ca-2cb6-4cc7-a46b-2bbfd3e61b22'),
  strategyLevel?: int32(name='StrategyLevel', example='2'),
}

model ModifyEmptyNumberNoMoreCallsInfoResponseBody = {
  code?: string(name='Code', example='OK'),
  httpStatusCode?: int32(name='HttpStatusCode', example='200'),
  message?: string(name='Message', example='Success'),
  requestId?: string(name='RequestId', example='254EB995-DEDF-48A4-9101-9CA5B72FFBCC'),
  success?: boolean(name='Success', example='true'),
}

model ModifyEmptyNumberNoMoreCallsInfoResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: ModifyEmptyNumberNoMoreCallsInfoResponseBody(name='body'),
}

/**
 * @param request ModifyEmptyNumberNoMoreCallsInfoRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return ModifyEmptyNumberNoMoreCallsInfoResponse
 */
async function modifyEmptyNumberNoMoreCallsInfoWithOptions(request: ModifyEmptyNumberNoMoreCallsInfoRequest, runtime: Util.RuntimeOptions): ModifyEmptyNumberNoMoreCallsInfoResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.emptyNumberNoMoreCalls)) {
    query['EmptyNumberNoMoreCalls'] = request.emptyNumberNoMoreCalls;
  }
  if (!Util.isUnset(request.entryId)) {
    query['EntryId'] = request.entryId;
  }
  if (!Util.isUnset(request.strategyLevel)) {
    query['StrategyLevel'] = request.strategyLevel;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'ModifyEmptyNumberNoMoreCallsInfo',
    version = '2019-12-26',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @param request ModifyEmptyNumberNoMoreCallsInfoRequest
 * @return ModifyEmptyNumberNoMoreCallsInfoResponse
 */
async function modifyEmptyNumberNoMoreCallsInfo(request: ModifyEmptyNumberNoMoreCallsInfoRequest): ModifyEmptyNumberNoMoreCallsInfoResponse {
  var runtime = new Util.RuntimeOptions{};
  return modifyEmptyNumberNoMoreCallsInfoWithOptions(request, runtime);
}

model ModifyGlobalQuestionRequest {
  answers?: string(name='Answers', description='This parameter is required.'),
  globalQuestionId?: string(name='GlobalQuestionId', description='This parameter is required.', example='ad80de88-1661-445a-92ec-bf88dc45d581'),
  globalQuestionName?: string(name='GlobalQuestionName', description='This parameter is required.'),
  globalQuestionType?: string(name='GlobalQuestionType', description='This parameter is required.', example='COMMON'),
  instanceId?: string(name='InstanceId', description='This parameter is required.', example='8fa1953f-4a84-46d8-b80c-8ce9cf684fb3'),
  questions?: string(name='Questions', description='This parameter is required.'),
  scriptId?: string(name='ScriptId', description='This parameter is required.', example='19ac2375-53e3-477f-abe9-6cd334227981'),
}

model ModifyGlobalQuestionResponseBody = {
  code?: string(name='Code', example='OK'),
  dialogueQuestionId?: string(name='DialogueQuestionId', example='ad80de88-1661-445a-92ec-bf88dc45d581'),
  httpStatusCode?: int32(name='HttpStatusCode', example='200'),
  message?: string(name='Message', example='Success'),
  requestId?: string(name='RequestId', example='254EB995-DEDF-48A4-9101-9CA5B72FFBCC'),
  success?: boolean(name='Success', example='true'),
}

model ModifyGlobalQuestionResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: ModifyGlobalQuestionResponseBody(name='body'),
}

/**
 * @param request ModifyGlobalQuestionRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return ModifyGlobalQuestionResponse
 */
async function modifyGlobalQuestionWithOptions(request: ModifyGlobalQuestionRequest, runtime: Util.RuntimeOptions): ModifyGlobalQuestionResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.answers)) {
    query['Answers'] = request.answers;
  }
  if (!Util.isUnset(request.globalQuestionId)) {
    query['GlobalQuestionId'] = request.globalQuestionId;
  }
  if (!Util.isUnset(request.globalQuestionName)) {
    query['GlobalQuestionName'] = request.globalQuestionName;
  }
  if (!Util.isUnset(request.globalQuestionType)) {
    query['GlobalQuestionType'] = request.globalQuestionType;
  }
  if (!Util.isUnset(request.instanceId)) {
    query['InstanceId'] = request.instanceId;
  }
  if (!Util.isUnset(request.questions)) {
    query['Questions'] = request.questions;
  }
  if (!Util.isUnset(request.scriptId)) {
    query['ScriptId'] = request.scriptId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'ModifyGlobalQuestion',
    version = '2019-12-26',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @param request ModifyGlobalQuestionRequest
 * @return ModifyGlobalQuestionResponse
 */
async function modifyGlobalQuestion(request: ModifyGlobalQuestionRequest): ModifyGlobalQuestionResponse {
  var runtime = new Util.RuntimeOptions{};
  return modifyGlobalQuestionWithOptions(request, runtime);
}

model ModifyInstanceRequest {
  callingNumber?: [ string ](name='CallingNumber', example='["95187"]'),
  instanceDescription?: string(name='InstanceDescription'),
  instanceId?: string(name='InstanceId', description='This parameter is required.', example='90515b5-6115-4ccf-83e2-52d5bfaf2ddf'),
  instanceName?: string(name='InstanceName'),
  maxConcurrentConversation?: int32(name='MaxConcurrentConversation', description='This parameter is required.', example='5'),
}

model ModifyInstanceResponseBody = {
  code?: string(name='Code', example='OK'),
  httpStatusCode?: int32(name='HttpStatusCode', example='200'),
  instance?: {
    creationTime?: long(name='CreationTime', example='1578469042851'),
    creatorId?: long(name='CreatorId', example='123123'),
    creatorName?: string(name='CreatorName', example='xxx'),
    instanceDescription?: string(name='InstanceDescription'),
    instanceId?: string(name='InstanceId', example='90515b5-6115-4ccf-83e2-52d5bfaf2ddf'),
    instanceName?: string(name='InstanceName'),
    maxConcurrentConversation?: int32(name='MaxConcurrentConversation', example='5'),
    ownerName?: string(name='OwnerName', example='xxx'),
  }(name='Instance', example='{\\\\"InstanceId\\\\": \\\\"ob369xifpi2074\\\\", \\\\"AutoUpgradeObVersion\\\\": False}'),
  message?: string(name='Message', example='Success'),
  requestId?: string(name='RequestId', example='254EB995-DEDF-48A4-9101-9CA5B72FFBCC'),
  success?: boolean(name='Success', example='true'),
}

model ModifyInstanceResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: ModifyInstanceResponseBody(name='body'),
}

/**
 * @param request ModifyInstanceRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return ModifyInstanceResponse
 */
async function modifyInstanceWithOptions(request: ModifyInstanceRequest, runtime: Util.RuntimeOptions): ModifyInstanceResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.callingNumber)) {
    query['CallingNumber'] = request.callingNumber;
  }
  if (!Util.isUnset(request.instanceDescription)) {
    query['InstanceDescription'] = request.instanceDescription;
  }
  if (!Util.isUnset(request.instanceId)) {
    query['InstanceId'] = request.instanceId;
  }
  if (!Util.isUnset(request.instanceName)) {
    query['InstanceName'] = request.instanceName;
  }
  if (!Util.isUnset(request.maxConcurrentConversation)) {
    query['MaxConcurrentConversation'] = request.maxConcurrentConversation;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'ModifyInstance',
    version = '2019-12-26',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @param request ModifyInstanceRequest
 * @return ModifyInstanceResponse
 */
async function modifyInstance(request: ModifyInstanceRequest): ModifyInstanceResponse {
  var runtime = new Util.RuntimeOptions{};
  return modifyInstanceWithOptions(request, runtime);
}

model ModifyIntentRequest {
  instanceId?: string(name='InstanceId', description='This parameter is required.', example='8fa1953f-4a84-46d8-b80c-8ce9cf684fb3'),
  intentDescription?: string(name='IntentDescription'),
  intentId?: string(name='IntentId', description='This parameter is required.', example='3b9a2b33-50d4-4576-8c68-22498f4bf731'),
  intentName?: string(name='IntentName', description='This parameter is required.'),
  keywords?: string(name='Keywords', example='[]'),
  scriptId?: string(name='ScriptId', description='This parameter is required.', example='9b70486f-b1c2-429c-8a24-62798015ab1b'),
  utterances?: string(name='Utterances', description='This parameter is required.'),
}

model ModifyIntentResponseBody = {
  code?: string(name='Code', example='OK'),
  httpStatusCode?: int32(name='HttpStatusCode', example='200'),
  intentId?: string(name='IntentId', example='3b9a2b33-50d4-4576-8c68-22498f4bf731'),
  message?: string(name='Message', example='Success'),
  requestId?: string(name='RequestId', example='254EB995-DEDF-48A4-9101-9CA5B72FFBCC'),
  success?: boolean(name='Success', example='true'),
}

model ModifyIntentResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: ModifyIntentResponseBody(name='body'),
}

/**
 * @param request ModifyIntentRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return ModifyIntentResponse
 */
async function modifyIntentWithOptions(request: ModifyIntentRequest, runtime: Util.RuntimeOptions): ModifyIntentResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.instanceId)) {
    query['InstanceId'] = request.instanceId;
  }
  if (!Util.isUnset(request.intentDescription)) {
    query['IntentDescription'] = request.intentDescription;
  }
  if (!Util.isUnset(request.intentId)) {
    query['IntentId'] = request.intentId;
  }
  if (!Util.isUnset(request.intentName)) {
    query['IntentName'] = request.intentName;
  }
  if (!Util.isUnset(request.keywords)) {
    query['Keywords'] = request.keywords;
  }
  if (!Util.isUnset(request.scriptId)) {
    query['ScriptId'] = request.scriptId;
  }
  if (!Util.isUnset(request.utterances)) {
    query['Utterances'] = request.utterances;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'ModifyIntent',
    version = '2019-12-26',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @param request ModifyIntentRequest
 * @return ModifyIntentResponse
 */
async function modifyIntent(request: ModifyIntentRequest): ModifyIntentResponse {
  var runtime = new Util.RuntimeOptions{};
  return modifyIntentWithOptions(request, runtime);
}

model ModifyJobGroupRequest {
  callingNumber?: [ string ](name='CallingNumber'),
  description?: string(name='Description'),
  flashSmsExtras?: string(name='FlashSmsExtras'),
  instanceId?: string(name='InstanceId', description='This parameter is required.', example='174952ab-9825-4cc9-a5e2-de82d7fa4cdd'),
  jobGroupId?: string(name='JobGroupId', description='This parameter is required.', example='3edc0260-6f7c-4de4-8535-09372240618b'),
  jobGroupStatus?: string(name='JobGroupStatus', example='Draft'),
  minConcurrency?: long(name='MinConcurrency', example='1'),
  name?: string(name='Name', description='This parameter is required.'),
  priority?: string(name='Priority'),
  recallCallingNumber?: [ string ](name='RecallCallingNumber'),
  recallStrategyJson?: string(name='RecallStrategyJson', example='{\\\\"emptyNumberIgnore\\\\":false,\\\\"inArrearsIgnore\\\\":false,\\\\"outOfServiceIgnore\\\\":false}'),
  ringingDuration?: long(name='RingingDuration', example='25'),
  scenarioId?: string(name='ScenarioId', example='c6a668d1-3145-4048-9101-cb3678bb8884'),
  scriptId?: string(name='ScriptId', example='5a3940ce-a12f-4222-9f0f-605a9b89ea7c'),
  strategyJson?: string(name='StrategyJson', example='{\\\\"maxAttemptsPerDay\\\\":\\\\"0\\\\",\\\\"minAttemptInterval\\\\":\\\\"5\\\\",\\\\"Id\\\\":\\\\"689fc584-7f9f-4dc2-933d-8711beef7b15\\\\"}'),
}

model ModifyJobGroupResponseBody = {
  code?: string(name='Code', example='OK'),
  httpStatusCode?: int32(name='HttpStatusCode', example='200'),
  jobGroup?: {
    callingNumbers?: [ string ](name='CallingNumbers'),
    creationTime?: long(name='CreationTime', example='1578550074361'),
    exportProgress?: {
      fileHttpUrl?: string(name='FileHttpUrl', example='https://***.oss-cn-shanghai.aliyuncs.com/sample'),
      progress?: string(name='Progress', example='1'),
      status?: string(name='Status', example='FINISHED'),
    }(name='ExportProgress'),
    flashSmsExtras?: string(name='FlashSmsExtras'),
    jobDataParsingTaskId?: string(name='JobDataParsingTaskId', example='e37d28cb-0413-4816-85ed-fd354d025ea3'),
    jobFilePath?: string(name='JobFilePath'),
    jobGroupDescription?: string(name='JobGroupDescription'),
    jobGroupId?: string(name='JobGroupId', example='c62e6789-28a8-41db-941e-171a01d3b3b9'),
    jobGroupName?: string(name='JobGroupName'),
    minConcurrency?: long(name='MinConcurrency', example='1'),
    modifyTime?: string(name='ModifyTime', example='1628425608429'),
    priority?: string(name='Priority'),
    recallStrategy?: {
      emptyNumberIgnore?: boolean(name='EmptyNumberIgnore', example='false'),
      inArrearsIgnore?: boolean(name='InArrearsIgnore', example='false'),
      outOfServiceIgnore?: boolean(name='OutOfServiceIgnore', example='false'),
    }(name='RecallStrategy'),
    ringingDuration?: long(name='RingingDuration'),
    scenarioId?: string(name='ScenarioId', example='6cea9bed-63e6-439e-ae4c-b3333efff53d'),
    scriptName?: string(name='ScriptName'),
    scriptVersion?: string(name='ScriptVersion', example='1628425608429'),
    status?: string(name='Status', example='Scheduling'),
    strategy?: {
      customized?: string(name='Customized', example='{}'),
      endTime?: long(name='EndTime', example='2209702074000'),
      followUpStrategy?: string(name='FollowUpStrategy', example='CONTINUE'),
      isTemplate?: boolean(name='IsTemplate', example='false'),
      maxAttemptsPerDay?: int32(name='MaxAttemptsPerDay', example='3'),
      minAttemptInterval?: int32(name='MinAttemptInterval', example='10'),
      repeatBy?: string(name='RepeatBy', example='Once'),
      repeatDays?: [ string ](name='RepeatDays'),
      routingStrategy?: string(name='RoutingStrategy', example='LocalFirst'),
      startTime?: long(name='StartTime', example='1578550074000'),
      strategyDescription?: string(name='StrategyDescription'),
      strategyId?: string(name='StrategyId', example='f718798d-96be-40e4-bef6-317b54855708'),
      strategyName?: string(name='StrategyName'),
      type?: string(name='Type', example='Repeatable'),
      workingTime?: [ 
        {
          beginTime?: string(name='BeginTime', example='09:00:00'),
          endTime?: string(name='EndTime', example='12:00:00'),
        }
      ](name='WorkingTime'),
    }(name='Strategy'),
  }(name='JobGroup'),
  message?: string(name='Message', example='Success'),
  requestId?: string(name='RequestId', example='254EB995-DEDF-48A4-9101-9CA5B72FFBCC'),
  success?: boolean(name='Success', example='true'),
}

model ModifyJobGroupResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: ModifyJobGroupResponseBody(name='body'),
}

/**
 * @param request ModifyJobGroupRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return ModifyJobGroupResponse
 */
async function modifyJobGroupWithOptions(request: ModifyJobGroupRequest, runtime: Util.RuntimeOptions): ModifyJobGroupResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.callingNumber)) {
    query['CallingNumber'] = request.callingNumber;
  }
  if (!Util.isUnset(request.description)) {
    query['Description'] = request.description;
  }
  if (!Util.isUnset(request.flashSmsExtras)) {
    query['FlashSmsExtras'] = request.flashSmsExtras;
  }
  if (!Util.isUnset(request.instanceId)) {
    query['InstanceId'] = request.instanceId;
  }
  if (!Util.isUnset(request.jobGroupId)) {
    query['JobGroupId'] = request.jobGroupId;
  }
  if (!Util.isUnset(request.jobGroupStatus)) {
    query['JobGroupStatus'] = request.jobGroupStatus;
  }
  if (!Util.isUnset(request.minConcurrency)) {
    query['MinConcurrency'] = request.minConcurrency;
  }
  if (!Util.isUnset(request.name)) {
    query['Name'] = request.name;
  }
  if (!Util.isUnset(request.priority)) {
    query['Priority'] = request.priority;
  }
  if (!Util.isUnset(request.recallCallingNumber)) {
    query['RecallCallingNumber'] = request.recallCallingNumber;
  }
  if (!Util.isUnset(request.recallStrategyJson)) {
    query['RecallStrategyJson'] = request.recallStrategyJson;
  }
  if (!Util.isUnset(request.ringingDuration)) {
    query['RingingDuration'] = request.ringingDuration;
  }
  if (!Util.isUnset(request.scenarioId)) {
    query['ScenarioId'] = request.scenarioId;
  }
  if (!Util.isUnset(request.scriptId)) {
    query['ScriptId'] = request.scriptId;
  }
  if (!Util.isUnset(request.strategyJson)) {
    query['StrategyJson'] = request.strategyJson;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'ModifyJobGroup',
    version = '2019-12-26',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @param request ModifyJobGroupRequest
 * @return ModifyJobGroupResponse
 */
async function modifyJobGroup(request: ModifyJobGroupRequest): ModifyJobGroupResponse {
  var runtime = new Util.RuntimeOptions{};
  return modifyJobGroupWithOptions(request, runtime);
}

model ModifyOutboundCallNumberRequest {
  instanceId?: string(name='InstanceId', description='This parameter is required.', example='52e80b02-0126-4556-a1e6-ef5b3747ed53/a9a3ddc7-d7d7-48cd-82b5-b31bb5510e71_2a66f8ad-dfbb-4980-9b84-439171295a11.xlsx'),
  number?: string(name='Number', description='This parameter is required.', example='10088'),
  outboundCallNumberId?: string(name='OutboundCallNumberId', description='This parameter is required.', example='fa0e21e9-caab-4629-9121-1e341243d599'),
  rateLimitCount?: int32(name='RateLimitCount', description='This parameter is required.', example='10'),
  rateLimitPeriod?: int32(name='RateLimitPeriod', description='This parameter is required.', example='100'),
}

model ModifyOutboundCallNumberResponseBody = {
  code?: string(name='Code', example='OK'),
  httpStatusCode?: int32(name='HttpStatusCode', example='200'),
  message?: string(name='Message', example='Success'),
  outboundCallNumber?: {
    number?: string(name='Number', example='10088'),
    outboundCallNumberId?: string(name='OutboundCallNumberId', example='fa0e21e9-caab-4629-9121-1e341243d599'),
    rateLimitCount?: string(name='RateLimitCount', example='10'),
    rateLimitPeriod?: string(name='RateLimitPeriod', example='100'),
  }(name='OutboundCallNumber'),
  requestId?: string(name='RequestId', example='254EB995-DEDF-48A4-9101-9CA5B72FFBCC'),
  success?: boolean(name='Success', example='true'),
}

model ModifyOutboundCallNumberResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: ModifyOutboundCallNumberResponseBody(name='body'),
}

/**
 * @summary ModifyOutboundCallNumber
 *
 * @param request ModifyOutboundCallNumberRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return ModifyOutboundCallNumberResponse
 */
async function modifyOutboundCallNumberWithOptions(request: ModifyOutboundCallNumberRequest, runtime: Util.RuntimeOptions): ModifyOutboundCallNumberResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.instanceId)) {
    query['InstanceId'] = request.instanceId;
  }
  if (!Util.isUnset(request.number)) {
    query['Number'] = request.number;
  }
  if (!Util.isUnset(request.outboundCallNumberId)) {
    query['OutboundCallNumberId'] = request.outboundCallNumberId;
  }
  if (!Util.isUnset(request.rateLimitCount)) {
    query['RateLimitCount'] = request.rateLimitCount;
  }
  if (!Util.isUnset(request.rateLimitPeriod)) {
    query['RateLimitPeriod'] = request.rateLimitPeriod;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'ModifyOutboundCallNumber',
    version = '2019-12-26',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary ModifyOutboundCallNumber
 *
 * @param request ModifyOutboundCallNumberRequest
 * @return ModifyOutboundCallNumberResponse
 */
async function modifyOutboundCallNumber(request: ModifyOutboundCallNumberRequest): ModifyOutboundCallNumberResponse {
  var runtime = new Util.RuntimeOptions{};
  return modifyOutboundCallNumberWithOptions(request, runtime);
}

model ModifyScriptRequest {
  agentId?: long(name='AgentId'),
  agentKey?: string(name='AgentKey'),
  agentLlm?: boolean(name='AgentLlm'),
  asrConfig?: string(name='AsrConfig', example='{\\\\"AppKey\\\\":\\\\"kknxKIhTTUcpCzYX\\\\"}'),
  chatConfig?: string(name='ChatConfig'),
  chatbotId?: string(name='ChatbotId', example='chatbot-cn-iFZfi7eq6e'),
  emotionEnable?: boolean(name='EmotionEnable', example='true'),
  industry?: string(name='Industry', description='This parameter is required.'),
  instanceId?: string(name='InstanceId', description='This parameter is required.', example='c6320d3c-fa45-4011-b3b1-acdfabe3a8c6'),
  longWaitEnable?: boolean(name='LongWaitEnable', example='true'),
  miniPlaybackConfigListJsonString?: string(name='MiniPlaybackConfigListJsonString'),
  miniPlaybackEnable?: boolean(name='MiniPlaybackEnable', example='true'),
  newBargeInEnable?: boolean(name='NewBargeInEnable', example='true'),
  nlsConfig?: string(name='NlsConfig'),
  nluAccessType?: string(name='NluAccessType'),
  nluEngine?: string(name='NluEngine'),
  scene?: string(name='Scene', description='This parameter is required.'),
  scriptContent?: [ string ](name='ScriptContent'),
  scriptDescription?: string(name='ScriptDescription'),
  scriptId?: string(name='ScriptId', description='This parameter is required.', example='c153d0d8-ba04-41c0-8632-453944c9dd0b'),
  scriptName?: string(name='ScriptName', description='This parameter is required.'),
  scriptWaveform?: [ string ](name='ScriptWaveform'),
  ttsConfig?: string(name='TtsConfig', example='{\\\\"voice\\\\":\\\\"siyue\\\\",\\\\"volume\\\\":\\\\"50\\\\",\\\\"speechRate\\\\":\\\\"-150\\\\",\\\\"pitchRate\\\\":\\\\"0\\\\"}'),
}

model ModifyScriptResponseBody = {
  code?: string(name='Code', example='OK'),
  httpStatusCode?: int32(name='HttpStatusCode', example='200'),
  message?: string(name='Message', example='Success'),
  requestId?: string(name='RequestId', example='254EB995-DEDF-48A4-9101-9CA5B72FFBCC'),
  script?: {
    debugStatus?: string(name='DebugStatus', example='DRAFTED'),
    industry?: string(name='Industry'),
    isDebugDrafted?: boolean(name='IsDebugDrafted', example='true'),
    isDrafted?: boolean(name='IsDrafted', example='true'),
    scene?: string(name='Scene'),
    scriptDescription?: string(name='ScriptDescription'),
    scriptId?: string(name='ScriptId', example='c153d0d8-ba04-41c0-8632-453944c9dd0b'),
    scriptName?: string(name='ScriptName'),
    status?: string(name='Status', example='PUBLISHED'),
    updateTime?: long(name='UpdateTime', example='1578881227000'),
  }(name='Script'),
  success?: boolean(name='Success', example='true'),
}

model ModifyScriptResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: ModifyScriptResponseBody(name='body'),
}

/**
 * @param request ModifyScriptRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return ModifyScriptResponse
 */
async function modifyScriptWithOptions(request: ModifyScriptRequest, runtime: Util.RuntimeOptions): ModifyScriptResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.agentId)) {
    query['AgentId'] = request.agentId;
  }
  if (!Util.isUnset(request.agentKey)) {
    query['AgentKey'] = request.agentKey;
  }
  if (!Util.isUnset(request.agentLlm)) {
    query['AgentLlm'] = request.agentLlm;
  }
  if (!Util.isUnset(request.asrConfig)) {
    query['AsrConfig'] = request.asrConfig;
  }
  if (!Util.isUnset(request.chatConfig)) {
    query['ChatConfig'] = request.chatConfig;
  }
  if (!Util.isUnset(request.chatbotId)) {
    query['ChatbotId'] = request.chatbotId;
  }
  if (!Util.isUnset(request.emotionEnable)) {
    query['EmotionEnable'] = request.emotionEnable;
  }
  if (!Util.isUnset(request.industry)) {
    query['Industry'] = request.industry;
  }
  if (!Util.isUnset(request.instanceId)) {
    query['InstanceId'] = request.instanceId;
  }
  if (!Util.isUnset(request.longWaitEnable)) {
    query['LongWaitEnable'] = request.longWaitEnable;
  }
  if (!Util.isUnset(request.miniPlaybackConfigListJsonString)) {
    query['MiniPlaybackConfigListJsonString'] = request.miniPlaybackConfigListJsonString;
  }
  if (!Util.isUnset(request.miniPlaybackEnable)) {
    query['MiniPlaybackEnable'] = request.miniPlaybackEnable;
  }
  if (!Util.isUnset(request.newBargeInEnable)) {
    query['NewBargeInEnable'] = request.newBargeInEnable;
  }
  if (!Util.isUnset(request.nlsConfig)) {
    query['NlsConfig'] = request.nlsConfig;
  }
  if (!Util.isUnset(request.nluAccessType)) {
    query['NluAccessType'] = request.nluAccessType;
  }
  if (!Util.isUnset(request.nluEngine)) {
    query['NluEngine'] = request.nluEngine;
  }
  if (!Util.isUnset(request.scene)) {
    query['Scene'] = request.scene;
  }
  if (!Util.isUnset(request.scriptContent)) {
    query['ScriptContent'] = request.scriptContent;
  }
  if (!Util.isUnset(request.scriptDescription)) {
    query['ScriptDescription'] = request.scriptDescription;
  }
  if (!Util.isUnset(request.scriptId)) {
    query['ScriptId'] = request.scriptId;
  }
  if (!Util.isUnset(request.scriptName)) {
    query['ScriptName'] = request.scriptName;
  }
  if (!Util.isUnset(request.scriptWaveform)) {
    query['ScriptWaveform'] = request.scriptWaveform;
  }
  if (!Util.isUnset(request.ttsConfig)) {
    query['TtsConfig'] = request.ttsConfig;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'ModifyScript',
    version = '2019-12-26',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @param request ModifyScriptRequest
 * @return ModifyScriptResponse
 */
async function modifyScript(request: ModifyScriptRequest): ModifyScriptResponse {
  var runtime = new Util.RuntimeOptions{};
  return modifyScriptWithOptions(request, runtime);
}

model ModifyScriptVoiceConfigRequest {
  instanceId?: string(name='InstanceId', description='This parameter is required.', example='bdd49242-114c-4045-b1d1-25ccc1756c75'),
  scriptId?: string(name='ScriptId', description='This parameter is required.', example='1d7a26e0-628b-4c3c-9918-7f2e23273f54'),
  scriptVoiceConfigId?: string(name='ScriptVoiceConfigId', description='This parameter is required.', example='e15cc646-50e5-4bc0-87ec-e4f2d1063b90'),
  scriptWaveformRelation?: string(name='ScriptWaveformRelation'),
  type?: string(name='Type', description='This parameter is required.', example='WAVEFORM'),
}

model ModifyScriptVoiceConfigResponseBody = {
  code?: string(name='Code', example='OK'),
  httpStatusCode?: int32(name='HttpStatusCode', example='200'),
  message?: string(name='Message', example='Success'),
  requestId?: string(name='RequestId', example='254EB995-DEDF-48A4-9101-9CA5B72FFBCC'),
  scriptVoiceConfig?: {
    instanceId?: string(name='InstanceId', example='bdd49242-114c-4045-b1d1-25ccc1756c75'),
    scriptContent?: string(name='ScriptContent'),
    scriptId?: string(name='ScriptId', example='1d7a26e0-628b-4c3c-9918-7f2e23273f54'),
    scriptVoiceConfigId?: string(name='ScriptVoiceConfigId', example='4ddea690-6534-4c88-9cbd-0b5882ec64c0'),
    scriptWaveformRelation?: string(name='ScriptWaveformRelation'),
    source?: string(name='Source', example='DIALOGUE_FLOW'),
    type?: string(name='Type', example='WAVEFORM'),
  }(name='ScriptVoiceConfig'),
  success?: boolean(name='Success', example='true'),
}

model ModifyScriptVoiceConfigResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: ModifyScriptVoiceConfigResponseBody(name='body'),
}

/**
 * @param request ModifyScriptVoiceConfigRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return ModifyScriptVoiceConfigResponse
 */
async function modifyScriptVoiceConfigWithOptions(request: ModifyScriptVoiceConfigRequest, runtime: Util.RuntimeOptions): ModifyScriptVoiceConfigResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.instanceId)) {
    query['InstanceId'] = request.instanceId;
  }
  if (!Util.isUnset(request.scriptId)) {
    query['ScriptId'] = request.scriptId;
  }
  if (!Util.isUnset(request.scriptVoiceConfigId)) {
    query['ScriptVoiceConfigId'] = request.scriptVoiceConfigId;
  }
  if (!Util.isUnset(request.scriptWaveformRelation)) {
    query['ScriptWaveformRelation'] = request.scriptWaveformRelation;
  }
  if (!Util.isUnset(request.type)) {
    query['Type'] = request.type;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'ModifyScriptVoiceConfig',
    version = '2019-12-26',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @param request ModifyScriptVoiceConfigRequest
 * @return ModifyScriptVoiceConfigResponse
 */
async function modifyScriptVoiceConfig(request: ModifyScriptVoiceConfigRequest): ModifyScriptVoiceConfigResponse {
  var runtime = new Util.RuntimeOptions{};
  return modifyScriptVoiceConfigWithOptions(request, runtime);
}

model ModifyTTSConfigRequest {
  appKey?: string(name='AppKey', example='99****Aw'),
  instanceId?: string(name='InstanceId', description='This parameter is required.', example='27244bae-e446-4811-bb1d-f8a07b525af0'),
  nlsServiceType?: string(name='NlsServiceType', example='Managed'),
  pitchRate?: string(name='PitchRate', description='语调 [-500,500]之间整数。默认值为0。

大于0表示升高音高。

小于0表示降低音高。'),
  scriptId?: string(name='ScriptId', description='This parameter is required.', example='1f1a2ba0-b3e7-4ff9-baf1-6dc8aeac0791'),
  speechRate?: string(name='SpeechRate'),
  voice?: string(name='Voice'),
  volume?: string(name='Volume', example='100'),
}

model ModifyTTSConfigResponseBody = {
  code?: string(name='Code', example='OK'),
  httpStatusCode?: int32(name='HttpStatusCode', example='200'),
  message?: string(name='Message', example='Success'),
  requestId?: string(name='RequestId', example='f765d3ee-ec03-4765-b235-6877501d99d1'),
  success?: boolean(name='Success', example='true'),
  TTSConfig?: {
    instanceId?: string(name='InstanceId', example='291cfc6a-8703-4bdd-a99d-9cba32d5288a'),
    pitchRate?: string(name='PitchRate', description='语调
[-500,500]之间整数。默认值为0。

大于0表示升高音高。

小于0表示降低音高。'),
    scriptId?: string(name='ScriptId', example='947e0875-b5d4-4b33-b18c-7b2cf85bcb4f'),
    speechRate?: string(name='SpeechRate', example='50'),
    TTSConfigId?: string(name='TTSConfigId', example='2a07b634-e15d-445f-bbcb-fc4ea2df7b87'),
    voice?: string(name='Voice', example='xiaoyun'),
    volume?: string(name='Volume', example='100'),
  }(name='TTSConfig'),
}

model ModifyTTSConfigResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: ModifyTTSConfigResponseBody(name='body'),
}

/**
 * @param request ModifyTTSConfigRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return ModifyTTSConfigResponse
 */
async function modifyTTSConfigWithOptions(request: ModifyTTSConfigRequest, runtime: Util.RuntimeOptions): ModifyTTSConfigResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.appKey)) {
    query['AppKey'] = request.appKey;
  }
  if (!Util.isUnset(request.instanceId)) {
    query['InstanceId'] = request.instanceId;
  }
  if (!Util.isUnset(request.nlsServiceType)) {
    query['NlsServiceType'] = request.nlsServiceType;
  }
  if (!Util.isUnset(request.pitchRate)) {
    query['PitchRate'] = request.pitchRate;
  }
  if (!Util.isUnset(request.scriptId)) {
    query['ScriptId'] = request.scriptId;
  }
  if (!Util.isUnset(request.speechRate)) {
    query['SpeechRate'] = request.speechRate;
  }
  if (!Util.isUnset(request.voice)) {
    query['Voice'] = request.voice;
  }
  if (!Util.isUnset(request.volume)) {
    query['Volume'] = request.volume;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'ModifyTTSConfig',
    version = '2019-12-26',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @param request ModifyTTSConfigRequest
 * @return ModifyTTSConfigResponse
 */
async function modifyTTSConfig(request: ModifyTTSConfigRequest): ModifyTTSConfigResponse {
  var runtime = new Util.RuntimeOptions{};
  return modifyTTSConfigWithOptions(request, runtime);
}

model ModifyTagGroupsRequest {
  instanceId?: string(name='InstanceId', description='This parameter is required.', example='cd560e89-0459-4c8a-ad98-47d713e4abd6'),
  scriptId?: string(name='ScriptId', description='This parameter is required.', example='365b955d-6f4d-4ab5-a6e1-9a301307f4b1'),
  tagGroups?: string(name='TagGroups', description='This parameter is required.'),
  tags?: string(name='Tags', description='This parameter is required.'),
}

model ModifyTagGroupsResponseBody = {
  code?: string(name='Code', example='OK'),
  httpStatusCode?: int32(name='HttpStatusCode', example='200'),
  message?: string(name='Message', example='Success'),
  requestId?: string(name='RequestId', example='5a865b03-d2b9-4ef9-be98-f21fa0d93744'),
  success?: boolean(name='Success', example='true'),
  tagGroups?: [ 
    {
      scriptId?: string(name='ScriptId', example='365b955d-6f4d-4ab5-a6e1-9a301307f4b1'),
      tagGroup?: string(name='TagGroup'),
      tagGroupId?: string(name='TagGroupId', example='54629be9-0746-464a-ab59-4830242cf644'),
      tagGroupIndex?: int32(name='TagGroupIndex', example='1'),
    }
  ](name='TagGroups'),
  tags?: [ 
    {
      scriptId?: string(name='ScriptId', example='365b955d-6f4d-4ab5-a6e1-9a301307f4b1'),
      tagGroup?: string(name='TagGroup'),
      tagId?: string(name='TagId', example='19b23e92-4ee3-4129-8c2e-e1968670d887'),
      tagIndex?: int32(name='TagIndex', example='1'),
      tagName?: string(name='TagName'),
    }
  ](name='Tags'),
}

model ModifyTagGroupsResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: ModifyTagGroupsResponseBody(name='body'),
}

/**
 * @param request ModifyTagGroupsRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return ModifyTagGroupsResponse
 */
async function modifyTagGroupsWithOptions(request: ModifyTagGroupsRequest, runtime: Util.RuntimeOptions): ModifyTagGroupsResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.instanceId)) {
    query['InstanceId'] = request.instanceId;
  }
  if (!Util.isUnset(request.scriptId)) {
    query['ScriptId'] = request.scriptId;
  }
  if (!Util.isUnset(request.tagGroups)) {
    query['TagGroups'] = request.tagGroups;
  }
  if (!Util.isUnset(request.tags)) {
    query['Tags'] = request.tags;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'ModifyTagGroups',
    version = '2019-12-26',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @param request ModifyTagGroupsRequest
 * @return ModifyTagGroupsResponse
 */
async function modifyTagGroups(request: ModifyTagGroupsRequest): ModifyTagGroupsResponse {
  var runtime = new Util.RuntimeOptions{};
  return modifyTagGroupsWithOptions(request, runtime);
}

model PublishScriptRequest {
  description?: string(name='Description', description='This parameter is required.'),
  instanceId?: string(name='InstanceId', description='This parameter is required.', example='af81a389-91f0-4157-8d82-720edd02b66a'),
  scriptId?: string(name='ScriptId', description='This parameter is required.', example='3677fe8b-276f-4541-babf-b9d3082a31ba'),
}

model PublishScriptResponseBody = {
  code?: string(name='Code', example='OK'),
  httpStatusCode?: int32(name='HttpStatusCode', example='200'),
  message?: string(name='Message', example='Success'),
  requestId?: string(name='RequestId', example='254EB995-DEDF-48A4-9101-9CA5B72FFBCC'),
  success?: boolean(name='Success', example='true'),
}

model PublishScriptResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: PublishScriptResponseBody(name='body'),
}

/**
 * @param request PublishScriptRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return PublishScriptResponse
 */
async function publishScriptWithOptions(request: PublishScriptRequest, runtime: Util.RuntimeOptions): PublishScriptResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.description)) {
    query['Description'] = request.description;
  }
  if (!Util.isUnset(request.instanceId)) {
    query['InstanceId'] = request.instanceId;
  }
  if (!Util.isUnset(request.scriptId)) {
    query['ScriptId'] = request.scriptId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'PublishScript',
    version = '2019-12-26',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @param request PublishScriptRequest
 * @return PublishScriptResponse
 */
async function publishScript(request: PublishScriptRequest): PublishScriptResponse {
  var runtime = new Util.RuntimeOptions{};
  return publishScriptWithOptions(request, runtime);
}

model PublishScriptForDebugRequest {
  instanceId?: string(name='InstanceId', description='This parameter is required.', example='af81a389-91f0-4157-8d82-720edd02b66a'),
  scriptId?: string(name='ScriptId', description='This parameter is required.', example='0bfe34e5-a7fa-4aac-91d4-bd798518dffc'),
}

model PublishScriptForDebugResponseBody = {
  code?: string(name='Code', example='OK'),
  httpStatusCode?: int32(name='HttpStatusCode', example='200'),
  message?: string(name='Message', example='Success'),
  requestId?: string(name='RequestId', example='5a865b03-d2b9-4ef9-be98-f21fa0d93744'),
  success?: boolean(name='Success', example='true'),
}

model PublishScriptForDebugResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: PublishScriptForDebugResponseBody(name='body'),
}

/**
 * @param request PublishScriptForDebugRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return PublishScriptForDebugResponse
 */
async function publishScriptForDebugWithOptions(request: PublishScriptForDebugRequest, runtime: Util.RuntimeOptions): PublishScriptForDebugResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.instanceId)) {
    query['InstanceId'] = request.instanceId;
  }
  if (!Util.isUnset(request.scriptId)) {
    query['ScriptId'] = request.scriptId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'PublishScriptForDebug',
    version = '2019-12-26',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @param request PublishScriptForDebugRequest
 * @return PublishScriptForDebugResponse
 */
async function publishScriptForDebug(request: PublishScriptForDebugRequest): PublishScriptForDebugResponse {
  var runtime = new Util.RuntimeOptions{};
  return publishScriptForDebugWithOptions(request, runtime);
}

model QueryJobsRequest {
  contactName?: string(name='ContactName'),
  endTime?: long(name='EndTime', example='1579077794665'),
  instanceId?: string(name='InstanceId', description='This parameter is required.', example='af81a389-91f0-4157-8d82-720edd02b66a'),
  jobGroupId?: string(name='JobGroupId', example='994b8baf-7ef8-480c-b141-b7b6db77c4df'),
  pageNumber?: int32(name='PageNumber', description='This parameter is required.', example='1'),
  pageSize?: int32(name='PageSize', description='This parameter is required.', example='10'),
  phoneNumber?: string(name='PhoneNumber', example='135****8888'),
  scenarioId?: string(name='ScenarioId', example='b0f35dd1-0337-402e-9c4f-3a6c2426950a'),
  startTime?: long(name='StartTime', example='1579068424883'),
  timeAlignment?: string(name='TimeAlignment', example='start'),
}

model QueryJobsResponseBody = {
  code?: string(name='Code', example='OK'),
  httpStatusCode?: int32(name='HttpStatusCode', example='200'),
  jobs?: {
    list?: [ 
      {
        callingNumbers?: [ string ](name='CallingNumbers'),
        contacts?: [ 
          {
            contactId?: string(name='ContactId', example='db3db762-e421-44c9-9a01-cb423470757c'),
            contactName?: string(name='ContactName'),
            honorific?: string(name='Honorific'),
            jobId?: string(name='JobId', example='72dcd26b-f12d-4c27-b3af-18f6aed5b160'),
            phoneNumber?: string(name='PhoneNumber', example='135****8888'),
            referenceId?: string(name='ReferenceId', example='2fa6bac3-06da-4315-82ab-72d6fd3a6f34'),
            role?: string(name='Role', example='*'),
            state?: string(name='State', example='Available'),
          }
        ](name='Contacts'),
        extras?: [ 
          {
            key?: string(name='Key', example='djrq'),
            value?: string(name='Value', example='2019-08-21 09:49:59.0'),
          }
        ](name='Extras'),
        failureReason?: string(name='FailureReason', example='NoAnswer'),
        jobGroupId?: string(name='JobGroupId', example='fce6c599-8ede-40e3-9f78-0928eda7b4e8'),
        jobId?: string(name='JobId', example='fce6c599-8ede-40e3-9f78-0928eda7b4e8'),
        priority?: int32(name='Priority', example='1'),
        referenceId?: string(name='ReferenceId', example='d5971d98-7312-4f0e-a918-a17d67133e28'),
        scenarioId?: string(name='ScenarioId', example='ade80092-03d9-4f4d-ad4f-ab8a247d3150'),
        status?: string(name='Status', example='Succeeded'),
        strategyId?: string(name='StrategyId', example='c8a2b7f2-ad1a-4865-b872-d0080d9802d9'),
        summary?: [ 
          {
            category?: string(name='Category', example='{}'),
            content?: string(name='Content', example='5'),
            conversationDetailId?: string(name='ConversationDetailId', example='098b9b09-9223-4a8b-a422-99726f0457f3'),
            groupId?: string(name='GroupId', example='ba1ba502-d044-48c0-b710-0f1f840a7c53'),
            jobId?: string(name='JobId', example='994b8baf-7ef8-480c-b141-b7b6db77c4df'),
            summaryId?: string(name='SummaryId', example='dc67d544-df06-4625-ae48-13e3c9f72d8a'),
            summaryName?: string(name='SummaryName', example='score'),
            taskId?: string(name='TaskId', example='9fdf7a81-6781-4ab8-92fb-1d4231ef365e'),
          }
        ](name='Summary'),
        tagHits?: [ 
          {
            tagGroup?: string(name='TagGroup'),
            tagName?: string(name='TagName'),
          }
        ](name='TagHits'),
        tasks?: [ 
          {
            actualTime?: long(name='ActualTime', example='1579068424883'),
            brief?: string(name='Brief', example='1'),
            callId?: string(name='CallId', example='1528189846043'),
            calledNumber?: string(name='CalledNumber', example='135****8888'),
            callingNumber?: string(name='CallingNumber', example='0571****3106'),
            chatbotId?: string(name='ChatbotId', example='1234'),
            contact?: {
              contactId?: string(name='ContactId', example='db3db762-e421-44c9-9a01-cb423470757c'),
              contactName?: string(name='ContactName'),
              honorific?: string(name='Honorific'),
              jobId?: string(name='JobId', example='b72425bd-7871-4050-838e-033d80d754b7'),
              phoneNumber?: string(name='PhoneNumber', example='135****8888'),
              referenceId?: string(name='ReferenceId', example='2fa6bac3-06da-4315-82ab-72d6fd3a6f34'),
              role?: string(name='Role', example='*'),
              state?: string(name='State', example='Available'),
            }(name='Contact'),
            duration?: int32(name='Duration', example='120'),
            jobId?: string(name='JobId', example='b72425bd-7871-4050-838e-033d80d754b7'),
            planedTime?: long(name='PlanedTime', example='1579068424883'),
            scenarioId?: string(name='ScenarioId', example='ade80092-03d9-4f4d-ad4f-ab8a247d3150'),
            status?: string(name='Status', example='Succeeded'),
            taskId?: string(name='TaskId', example='ff44709e-39a6-43ba-959b-20fcabe3e496'),
          }
        ](name='Tasks'),
      }
    ](name='List'),
    pageNumber?: int32(name='PageNumber', example='1'),
    pageSize?: int32(name='PageSize', example='10'),
    totalCount?: int32(name='TotalCount', example='1'),
  }(name='Jobs'),
  message?: string(name='Message', example='Success'),
  requestId?: string(name='RequestId', example='254EB995-DEDF-48A4-9101-9CA5B72FFBCC'),
  success?: boolean(name='Success', example='true'),
}

model QueryJobsResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: QueryJobsResponseBody(name='body'),
}

/**
 * @summary QueryJobs
 *
 * @param request QueryJobsRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return QueryJobsResponse
 */
async function queryJobsWithOptions(request: QueryJobsRequest, runtime: Util.RuntimeOptions): QueryJobsResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.contactName)) {
    query['ContactName'] = request.contactName;
  }
  if (!Util.isUnset(request.endTime)) {
    query['EndTime'] = request.endTime;
  }
  if (!Util.isUnset(request.instanceId)) {
    query['InstanceId'] = request.instanceId;
  }
  if (!Util.isUnset(request.jobGroupId)) {
    query['JobGroupId'] = request.jobGroupId;
  }
  if (!Util.isUnset(request.pageNumber)) {
    query['PageNumber'] = request.pageNumber;
  }
  if (!Util.isUnset(request.pageSize)) {
    query['PageSize'] = request.pageSize;
  }
  if (!Util.isUnset(request.phoneNumber)) {
    query['PhoneNumber'] = request.phoneNumber;
  }
  if (!Util.isUnset(request.scenarioId)) {
    query['ScenarioId'] = request.scenarioId;
  }
  if (!Util.isUnset(request.startTime)) {
    query['StartTime'] = request.startTime;
  }
  if (!Util.isUnset(request.timeAlignment)) {
    query['TimeAlignment'] = request.timeAlignment;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'QueryJobs',
    version = '2019-12-26',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary QueryJobs
 *
 * @param request QueryJobsRequest
 * @return QueryJobsResponse
 */
async function queryJobs(request: QueryJobsRequest): QueryJobsResponse {
  var runtime = new Util.RuntimeOptions{};
  return queryJobsWithOptions(request, runtime);
}

model QueryJobsWithResultRequest {
  endActualTimeFilter?: long(name='EndActualTimeFilter'),
  hasAnsweredFilter?: boolean(name='HasAnsweredFilter', example='true'),
  hasHangUpByRejectionFilter?: boolean(name='HasHangUpByRejectionFilter', example='false'),
  hasReachedEndOfFlowFilter?: boolean(name='HasReachedEndOfFlowFilter', example='true'),
  instanceId?: string(name='InstanceId', description='This parameter is required.', example='9d53cd72-4050-4419-8c17-acc0bf158147'),
  jobFailureReasonsFilter?: string(name='JobFailureReasonsFilter', example='["NoAnswer"]'),
  jobGroupId?: string(name='JobGroupId', description='This parameter is required.', example='ad16fc35-d824-4102-a606-2be51c1aa6dd'),
  jobStatusFilter?: string(name='JobStatusFilter', example='Succeeded'),
  pageNumber?: int32(name='PageNumber', example='1'),
  pageSize?: int32(name='PageSize', example='10'),
  queryText?: string(name='QueryText', example='1882020****'),
  startActualTimeFilter?: long(name='StartActualTimeFilter'),
  taskStatusFilter?: string(name='TaskStatusFilter', example='Succeeded'),
}

model QueryJobsWithResultResponseBody = {
  code?: string(name='Code', description='Code', example='OK'),
  httpStatusCode?: int32(name='HttpStatusCode', example='200'),
  jobs?: {
    list?: [ 
      {
        id?: string(name='Id', example='cc231a1d-3c05-4739-8926-193ecf4097ba'),
        jobFailureReason?: string(name='JobFailureReason'),
        latestTask?: {
          callDuration?: int32(name='CallDuration', example='40000'),
          callDurationDisplay?: string(name='CallDurationDisplay', example='40'),
          callTime?: long(name='CallTime', example='1615363297000'),
          contact?: {
            honorific?: string(name='Honorific'),
            id?: string(name='Id', example='63860deb-6218-45df-b1e0-76f2b166e790'),
            jobUuid?: string(name='JobUuid', example='cc231a1d-3c05-4739-8926-193ecf4097ba'),
            name?: string(name='Name'),
            phoneNumber?: string(name='PhoneNumber', example='1882020****'),
            preferredPhoneNumber?: string(name='PreferredPhoneNumber', example='134123****'),
            referenceId?: string(name='ReferenceId', example='C01'),
            role?: string(name='Role'),
            round?: int32(name='Round', example='151'),
            state?: string(name='State', example='Available'),
          }(name='Contact'),
          dialExceptionCodes?: [ 
            {
              code?: string(name='Code', example='0'),
              hint?: string(name='Hint'),
            }
          ](name='DialExceptionCodes'),
          extras?: [ 
            {
              key?: string(name='Key', description='Key'),
              value?: string(name='Value', description='Value'),
            }
          ](name='Extras'),
          hasAnswered?: boolean(name='HasAnswered', example='true'),
          hasHangUpByRejection?: boolean(name='HasHangUpByRejection', example='false'),
          hasLastPlaybackCompleted?: boolean(name='HasLastPlaybackCompleted', example='true'),
          hasReachedEndOfFlow?: boolean(name='HasReachedEndOfFlow', example='true'),
          status?: string(name='Status', example='Succeeded'),
          statusName?: string(name='StatusName'),
          tagHits?: [ 
            {
              tagGroup?: string(name='TagGroup'),
              tagName?: string(name='TagName'),
            }
          ](name='TagHits'),
          taskEndReason?: string(name='TaskEndReason', example='FINISHED'),
        }(name='LatestTask'),
        status?: string(name='Status', example='Succeeded'),
        statusName?: string(name='StatusName'),
      }
    ](name='List'),
    pageCount?: int32(name='PageCount', example='1'),
    pageNumber?: int32(name='PageNumber', example='1'),
    pageSize?: int32(name='PageSize', example='10'),
    rowCount?: int32(name='RowCount', example='1'),
  }(name='Jobs'),
  message?: string(name='Message', example='Success'),
  requestId?: string(name='RequestId', example='9bdaa1d1-a036-4451-ab11-ca0373679091'),
  success?: boolean(name='Success', example='true'),
  variableNames?: [ string ](name='VariableNames'),
}

model QueryJobsWithResultResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: QueryJobsWithResultResponseBody(name='body'),
}

/**
 * @param request QueryJobsWithResultRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return QueryJobsWithResultResponse
 */
async function queryJobsWithResultWithOptions(request: QueryJobsWithResultRequest, runtime: Util.RuntimeOptions): QueryJobsWithResultResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.endActualTimeFilter)) {
    query['EndActualTimeFilter'] = request.endActualTimeFilter;
  }
  if (!Util.isUnset(request.hasAnsweredFilter)) {
    query['HasAnsweredFilter'] = request.hasAnsweredFilter;
  }
  if (!Util.isUnset(request.hasHangUpByRejectionFilter)) {
    query['HasHangUpByRejectionFilter'] = request.hasHangUpByRejectionFilter;
  }
  if (!Util.isUnset(request.hasReachedEndOfFlowFilter)) {
    query['HasReachedEndOfFlowFilter'] = request.hasReachedEndOfFlowFilter;
  }
  if (!Util.isUnset(request.instanceId)) {
    query['InstanceId'] = request.instanceId;
  }
  if (!Util.isUnset(request.jobFailureReasonsFilter)) {
    query['JobFailureReasonsFilter'] = request.jobFailureReasonsFilter;
  }
  if (!Util.isUnset(request.jobGroupId)) {
    query['JobGroupId'] = request.jobGroupId;
  }
  if (!Util.isUnset(request.jobStatusFilter)) {
    query['JobStatusFilter'] = request.jobStatusFilter;
  }
  if (!Util.isUnset(request.pageNumber)) {
    query['PageNumber'] = request.pageNumber;
  }
  if (!Util.isUnset(request.pageSize)) {
    query['PageSize'] = request.pageSize;
  }
  if (!Util.isUnset(request.queryText)) {
    query['QueryText'] = request.queryText;
  }
  if (!Util.isUnset(request.startActualTimeFilter)) {
    query['StartActualTimeFilter'] = request.startActualTimeFilter;
  }
  if (!Util.isUnset(request.taskStatusFilter)) {
    query['TaskStatusFilter'] = request.taskStatusFilter;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'QueryJobsWithResult',
    version = '2019-12-26',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @param request QueryJobsWithResultRequest
 * @return QueryJobsWithResultResponse
 */
async function queryJobsWithResult(request: QueryJobsWithResultRequest): QueryJobsWithResultResponse {
  var runtime = new Util.RuntimeOptions{};
  return queryJobsWithResultWithOptions(request, runtime);
}

model QueryScriptWaveformsRequest {
  instanceId?: string(name='InstanceId', description='This parameter is required.'),
  scriptContent?: string(name='ScriptContent', description='This parameter is required.'),
  scriptId?: string(name='ScriptId', description='This parameter is required.'),
}

model QueryScriptWaveformsResponseBody = {
  code?: string(name='Code'),
  httpStatusCode?: int32(name='HttpStatusCode'),
  message?: string(name='Message'),
  requestId?: string(name='RequestId'),
  scriptWaveforms?: [ 
    {
      fileId?: string(name='FileId'),
      fileName?: string(name='FileName'),
      scriptContent?: string(name='ScriptContent'),
      scriptId?: string(name='ScriptId'),
      scriptWaveformId?: string(name='ScriptWaveformId'),
    }
  ](name='ScriptWaveforms'),
  success?: boolean(name='Success'),
}

model QueryScriptWaveformsResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: QueryScriptWaveformsResponseBody(name='body'),
}

/**
 * @param request QueryScriptWaveformsRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return QueryScriptWaveformsResponse
 */
async function queryScriptWaveformsWithOptions(request: QueryScriptWaveformsRequest, runtime: Util.RuntimeOptions): QueryScriptWaveformsResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.instanceId)) {
    query['InstanceId'] = request.instanceId;
  }
  if (!Util.isUnset(request.scriptContent)) {
    query['ScriptContent'] = request.scriptContent;
  }
  if (!Util.isUnset(request.scriptId)) {
    query['ScriptId'] = request.scriptId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'QueryScriptWaveforms',
    version = '2019-12-26',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @param request QueryScriptWaveformsRequest
 * @return QueryScriptWaveformsResponse
 */
async function queryScriptWaveforms(request: QueryScriptWaveformsRequest): QueryScriptWaveformsResponse {
  var runtime = new Util.RuntimeOptions{};
  return queryScriptWaveformsWithOptions(request, runtime);
}

model QueryScriptsByStatusRequest {
  instanceId?: string(name='InstanceId', description='This parameter is required.', example='361c8a53-0e29-42f3-8aa7-c7752d010399'),
  pageNumber?: int32(name='PageNumber', description='This parameter is required.', example='1'),
  pageSize?: int32(name='PageSize', description='This parameter is required.', example='10'),
  statusList?: [ string ](name='StatusList', description='This parameter is required.'),
}

model QueryScriptsByStatusResponseBody = {
  code?: string(name='Code', example='OK'),
  httpStatusCode?: int32(name='HttpStatusCode', example='200'),
  message?: string(name='Message', example='Success'),
  requestId?: string(name='RequestId', example='254EB995-DEDF-48A4-9101-9CA5B72FFBCC'),
  scripts?: {
    list?: [ 
      {
        appliedVersion?: string(name='AppliedVersion', example='1579055782000'),
        debugStatus?: string(name='DebugStatus', example='PUBLISHED'),
        debugVersion?: string(name='DebugVersion', example='1579055782000'),
        industry?: string(name='Industry'),
        isDebugDrafted?: boolean(name='IsDebugDrafted', example='false'),
        isDrafted?: boolean(name='IsDrafted', example='false'),
        scene?: string(name='Scene'),
        scriptDescription?: string(name='ScriptDescription'),
        scriptId?: string(name='ScriptId', example='fa0e21e9-caab-4629-9121-1e341243d599'),
        scriptName?: string(name='ScriptName'),
        status?: string(name='Status', example='PUBLISHED'),
        updateTime?: long(name='UpdateTime', example='1579055782000'),
      }
    ](name='List'),
    pageNumber?: int32(name='PageNumber', example='1'),
    pageSize?: int32(name='PageSize', example='10'),
    totalCount?: int32(name='TotalCount', example='1'),
  }(name='Scripts'),
  success?: boolean(name='Success', example='true'),
}

model QueryScriptsByStatusResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: QueryScriptsByStatusResponseBody(name='body'),
}

/**
 * @param request QueryScriptsByStatusRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return QueryScriptsByStatusResponse
 */
async function queryScriptsByStatusWithOptions(request: QueryScriptsByStatusRequest, runtime: Util.RuntimeOptions): QueryScriptsByStatusResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.instanceId)) {
    query['InstanceId'] = request.instanceId;
  }
  if (!Util.isUnset(request.pageNumber)) {
    query['PageNumber'] = request.pageNumber;
  }
  if (!Util.isUnset(request.pageSize)) {
    query['PageSize'] = request.pageSize;
  }
  if (!Util.isUnset(request.statusList)) {
    query['StatusList'] = request.statusList;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'QueryScriptsByStatus',
    version = '2019-12-26',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @param request QueryScriptsByStatusRequest
 * @return QueryScriptsByStatusResponse
 */
async function queryScriptsByStatus(request: QueryScriptsByStatusRequest): QueryScriptsByStatusResponse {
  var runtime = new Util.RuntimeOptions{};
  return queryScriptsByStatusWithOptions(request, runtime);
}

model RecordFailureRequest {
  actualTime?: long(name='ActualTime', description='This parameter is required.', example='1579055782000'),
  callId?: string(name='CallId', description='This parameter is required.', example='4f21446e-324e-46f2-bf62-7f341fb004ea'),
  calledNumber?: string(name='CalledNumber', description='This parameter is required.', example='135815****'),
  callingNumber?: string(name='CallingNumber', description='This parameter is required.', example='10086'),
  dispositionCode?: string(name='DispositionCode', description='This parameter is required.', example='OutOfService'),
  exceptionCodes?: string(name='ExceptionCodes'),
  instanceId?: string(name='InstanceId', description='This parameter is required.', example='9ab43460-c0b9-40e2-8447-48d82c97fc67'),
  taskId?: string(name='TaskId', description='This parameter is required.', example='d2295c0e-3bc3-48a5-9f56-b185db2be909'),
}

model RecordFailureResponseBody = {
  code?: string(name='Code', example='OK'),
  httpStatusCode?: int32(name='HttpStatusCode', example='200'),
  message?: string(name='Message', example='Success'),
  requestId?: string(name='RequestId', example='254EB995-DEDF-48A4-9101-9CA5B72FFBCC'),
  success?: boolean(name='Success', example='true'),
}

model RecordFailureResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: RecordFailureResponseBody(name='body'),
}

/**
 * @param request RecordFailureRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return RecordFailureResponse
 */
async function recordFailureWithOptions(request: RecordFailureRequest, runtime: Util.RuntimeOptions): RecordFailureResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.actualTime)) {
    query['ActualTime'] = request.actualTime;
  }
  if (!Util.isUnset(request.callId)) {
    query['CallId'] = request.callId;
  }
  if (!Util.isUnset(request.calledNumber)) {
    query['CalledNumber'] = request.calledNumber;
  }
  if (!Util.isUnset(request.callingNumber)) {
    query['CallingNumber'] = request.callingNumber;
  }
  if (!Util.isUnset(request.dispositionCode)) {
    query['DispositionCode'] = request.dispositionCode;
  }
  if (!Util.isUnset(request.exceptionCodes)) {
    query['ExceptionCodes'] = request.exceptionCodes;
  }
  if (!Util.isUnset(request.instanceId)) {
    query['InstanceId'] = request.instanceId;
  }
  if (!Util.isUnset(request.taskId)) {
    query['TaskId'] = request.taskId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'RecordFailure',
    version = '2019-12-26',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @param request RecordFailureRequest
 * @return RecordFailureResponse
 */
async function recordFailure(request: RecordFailureRequest): RecordFailureResponse {
  var runtime = new Util.RuntimeOptions{};
  return recordFailureWithOptions(request, runtime);
}

model ResumeJobsRequest {
  all?: boolean(name='All', description='This parameter is required.', example='true'),
  instanceId?: string(name='InstanceId', description='This parameter is required.', example='af81a389-91f0-4157-8d82-720edd02b66a'),
  jobGroupId?: string(name='JobGroupId', example='de48407d-309e-451a-81ec-6fb11f8fdbf3'),
  jobId?: [ string ](name='JobId', example='b72425bd-7871-4050-838e-033d80d754b7'),
  jobReferenceId?: [ string ](name='JobReferenceId', example='d5971d98-7312-4f0e-a918-a17d67133e28'),
  scenarioId?: string(name='ScenarioId', example='b016fbdb-b81c-4c06-8870-cb36b8783b6d'),
}

model ResumeJobsResponseBody = {
  code?: string(name='Code', example='OK'),
  httpStatusCode?: int32(name='HttpStatusCode', example='200'),
  message?: string(name='Message', example='Success'),
  requestId?: string(name='RequestId', example='254EB995-DEDF-48A4-9101-9CA5B72FFBCC'),
  success?: boolean(name='Success', example='true'),
}

model ResumeJobsResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: ResumeJobsResponseBody(name='body'),
}

/**
 * @param request ResumeJobsRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return ResumeJobsResponse
 */
async function resumeJobsWithOptions(request: ResumeJobsRequest, runtime: Util.RuntimeOptions): ResumeJobsResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.all)) {
    query['All'] = request.all;
  }
  if (!Util.isUnset(request.instanceId)) {
    query['InstanceId'] = request.instanceId;
  }
  if (!Util.isUnset(request.jobGroupId)) {
    query['JobGroupId'] = request.jobGroupId;
  }
  if (!Util.isUnset(request.jobId)) {
    query['JobId'] = request.jobId;
  }
  if (!Util.isUnset(request.jobReferenceId)) {
    query['JobReferenceId'] = request.jobReferenceId;
  }
  if (!Util.isUnset(request.scenarioId)) {
    query['ScenarioId'] = request.scenarioId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'ResumeJobs',
    version = '2019-12-26',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @param request ResumeJobsRequest
 * @return ResumeJobsResponse
 */
async function resumeJobs(request: ResumeJobsRequest): ResumeJobsResponse {
  var runtime = new Util.RuntimeOptions{};
  return resumeJobsWithOptions(request, runtime);
}

model RollbackScriptRequest {
  instanceId?: string(name='InstanceId', description='This parameter is required.', example='af81a389-91f0-4157-8d82-720edd02b66a'),
  rollbackVersion?: string(name='RollbackVersion', description='This parameter is required.', example='1579055782000'),
  scriptId?: string(name='ScriptId', description='This parameter is required.', example='303523b1-0094-4ebe-b9ed-c23d11c91d61'),
}

model RollbackScriptResponseBody = {
  code?: string(name='Code', example='OK'),
  httpStatusCode?: int32(name='HttpStatusCode', example='200'),
  message?: string(name='Message', example='Success'),
  requestId?: string(name='RequestId', example='254EB995-DEDF-48A4-9101-9CA5B72FFBCC'),
  success?: boolean(name='Success', example='true'),
}

model RollbackScriptResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: RollbackScriptResponseBody(name='body'),
}

/**
 * @param request RollbackScriptRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return RollbackScriptResponse
 */
async function rollbackScriptWithOptions(request: RollbackScriptRequest, runtime: Util.RuntimeOptions): RollbackScriptResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.instanceId)) {
    query['InstanceId'] = request.instanceId;
  }
  if (!Util.isUnset(request.rollbackVersion)) {
    query['RollbackVersion'] = request.rollbackVersion;
  }
  if (!Util.isUnset(request.scriptId)) {
    query['ScriptId'] = request.scriptId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'RollbackScript',
    version = '2019-12-26',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @param request RollbackScriptRequest
 * @return RollbackScriptResponse
 */
async function rollbackScript(request: RollbackScriptRequest): RollbackScriptResponse {
  var runtime = new Util.RuntimeOptions{};
  return rollbackScriptWithOptions(request, runtime);
}

model SaveAfterAnswerDelayPlaybackRequest {
  afterAnswerDelayPlayback?: int32(name='AfterAnswerDelayPlayback', example='1000'),
  entryId?: string(name='EntryId', description='This parameter is required.', example='980116ec-2d3d-4747-8059-dc25e7af8501'),
  strategyLevel?: int32(name='StrategyLevel', example='2'),
}

model SaveAfterAnswerDelayPlaybackResponseBody = {
  code?: string(name='Code', example='OK'),
  httpStatusCode?: int32(name='HttpStatusCode', example='200'),
  message?: string(name='Message', example='Success'),
  requestId?: string(name='RequestId', example='254EB995-DEDF-48A4-9101-9CA5B72FFBCC'),
  success?: boolean(name='Success', example='true'),
}

model SaveAfterAnswerDelayPlaybackResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: SaveAfterAnswerDelayPlaybackResponseBody(name='body'),
}

/**
 * @param request SaveAfterAnswerDelayPlaybackRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return SaveAfterAnswerDelayPlaybackResponse
 */
async function saveAfterAnswerDelayPlaybackWithOptions(request: SaveAfterAnswerDelayPlaybackRequest, runtime: Util.RuntimeOptions): SaveAfterAnswerDelayPlaybackResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.afterAnswerDelayPlayback)) {
    query['AfterAnswerDelayPlayback'] = request.afterAnswerDelayPlayback;
  }
  if (!Util.isUnset(request.entryId)) {
    query['EntryId'] = request.entryId;
  }
  if (!Util.isUnset(request.strategyLevel)) {
    query['StrategyLevel'] = request.strategyLevel;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'SaveAfterAnswerDelayPlayback',
    version = '2019-12-26',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @param request SaveAfterAnswerDelayPlaybackRequest
 * @return SaveAfterAnswerDelayPlaybackResponse
 */
async function saveAfterAnswerDelayPlayback(request: SaveAfterAnswerDelayPlaybackRequest): SaveAfterAnswerDelayPlaybackResponse {
  var runtime = new Util.RuntimeOptions{};
  return saveAfterAnswerDelayPlaybackWithOptions(request, runtime);
}

model SaveAnnotationMissionSessionListRequest {
  agentId?: string(name='AgentId', example='1198938'),
  agentKey?: string(name='AgentKey', example='9137ab9c27044921860030adf8590ec4_p_outbound_public'),
  annotationMissionDataSourceType?: long(name='AnnotationMissionDataSourceType', example='1'),
  annotationMissionSessionList?: [ 
    {
      annotationMissionChatList?: [ 
        {
          annotationAsrResult?: string(name='AnnotationAsrResult'),
          annotationMissionChatCustomizationDataInfoList?: [ 
            {
              annotationMissionChatCustomizationDataInfoId?: string(name='AnnotationMissionChatCustomizationDataInfoId', description='id'),
              annotationMissionChatId?: string(name='AnnotationMissionChatId', description='chat id', example='977a45dc-b636-4407-9e98-9f572c709ada'),
              annotationMissionId?: string(name='AnnotationMissionId', example='03f56192-fa8a-40dc-9558-39b357f0618f'),
              annotationMissionSessionId?: string(name='AnnotationMissionSessionId', example='977a45dc-b636-4407-9e98-9f572c709ada'),
              content?: string(name='Content'),
              create?: boolean(name='Create', example='true'),
              createTime?: long(name='CreateTime', example='1682316909210'),
              customizationDataDescription?: string(name='CustomizationDataDescription'),
              customizationDataId?: string(name='CustomizationDataId', description='id', example='977a45dc-b636-4407-9e98-9f572c709ada'),
              customizationDataName?: string(name='CustomizationDataName'),
              customizationDataWeight?: int32(name='CustomizationDataWeight'),
              delete?: boolean(name='Delete', example='true'),
              instanceId?: string(name='InstanceId', example='b598a47a-7c03-45fb-af6b-343950dd9512'),
              modifiedTime?: long(name='ModifiedTime', example='1673438100000'),
            }
          ](name='AnnotationMissionChatCustomizationDataInfoList'),
          annotationMissionChatId?: string(name='AnnotationMissionChatId', description='chat id'),
          annotationMissionChatIntentUserSayInfoList?: [ 
            {
              annotationMissionChatId?: string(name='AnnotationMissionChatId'),
              annotationMissionChatIntentUserSayInfoId?: string(name='AnnotationMissionChatIntentUserSayInfoId'),
              annotationMissionId?: string(name='AnnotationMissionId'),
              annotationMissionSessionId?: string(name='AnnotationMissionSessionId'),
              botId?: string(name='BotId'),
              content?: string(name='Content'),
              create?: boolean(name='Create'),
              createTime?: long(name='CreateTime'),
              delete?: boolean(name='Delete'),
              dialogId?: long(name='DialogId'),
              instanceId?: string(name='InstanceId'),
              intentId?: long(name='IntentId'),
              modifiedTime?: long(name='ModifiedTime'),
            }
          ](name='AnnotationMissionChatIntentUserSayInfoList'),
          annotationMissionChatTagInfoList?: [ 
            {
              annotationMissionChatId?: string(name='AnnotationMissionChatId', description='chat id', example='977a45dc-b636-4407-9e98-9f572c709ada'),
              annotationMissionChatTagInfoId?: string(name='AnnotationMissionChatTagInfoId', description='id'),
              annotationMissionId?: string(name='AnnotationMissionId', example='977a45dc-b636-4407-9e98-9f572c709ada'),
              annotationMissionSessionId?: string(name='AnnotationMissionSessionId', example='977a45dc-b636-4407-9e98-9f572c709ada'),
              annotationMissionTagInfoId?: string(name='AnnotationMissionTagInfoId', description='tag id', example='977a45dc-b636-4407-9e98-9f572c709ada'),
              annotationMissionTagInfoName?: string(name='AnnotationMissionTagInfoName', example='-'),
              create?: boolean(name='Create', example='true'),
              createTime?: long(name='CreateTime', example='1679710866060'),
              delete?: boolean(name='Delete', example='false'),
              instanceId?: string(name='InstanceId', example='32be9d94-1346-4c4a-a4d0-ccd379f87013'),
              modifiedTime?: long(name='ModifiedTime', example='1679710866060'),
            }
          ](name='AnnotationMissionChatTagInfoList'),
          annotationMissionChatVocabularyInfoList?: [ 
            {
              annotationMissionChatId?: string(name='AnnotationMissionChatId', description='chat id'),
              annotationMissionChatVocabularyInfoId?: string(name='AnnotationMissionChatVocabularyInfoId', description='id'),
              annotationMissionId?: string(name='AnnotationMissionId', example='977a45dc-b636-4407-9e98-9f572c709ada'),
              annotationMissionSessionId?: string(name='AnnotationMissionSessionId'),
              create?: boolean(name='Create', example='false'),
              createTime?: long(name='CreateTime', example='1677552860720'),
              delete?: boolean(name='Delete', example='true'),
              instanceId?: string(name='InstanceId', example='77343553-cbc2-4487-a35c-869f1e86c573'),
              modifiedTime?: long(name='ModifiedTime', example='1679283408230'),
              vocabulary?: string(name='Vocabulary'),
              vocabularyDescription?: string(name='VocabularyDescription'),
              vocabularyId?: string(name='VocabularyId'),
              vocabularyName?: string(name='VocabularyName'),
              vocabularyWeight?: int32(name='VocabularyWeight'),
            }
          ](name='AnnotationMissionChatVocabularyInfoList'),
          annotationMissionId?: string(name='AnnotationMissionId', example='ddce607f-f537-4ebd-9914-cf45671defb9'),
          annotationMissionSessionId?: string(name='AnnotationMissionSessionId'),
          annotationStatus?: int32(name='AnnotationStatus', example='1'),
          answer?: string(name='Answer', example='{\\\\"Answer\\\\": u\\\\"\\\\u53c2\\\\u8003\\\\u6587\\\\u6863\\\\uff1ahttps://help.aliyun.com/document_detail/181325.html\\\\", \\\\"QuestionId\\\\": 372858, \\\\"Uuid\\\\": \\\\"ac14000516762684770197536d0044\\\\"}'),
          asrAnnotationStatus?: int32(name='AsrAnnotationStatus'),
          createTime?: long(name='CreateTime', example='1679629770336'),
          instanceId?: string(name='InstanceId', example='5ec263fa-c8de-46f4-b844-6fb8275bb645'),
          intentAnnotationStatus?: int32(name='IntentAnnotationStatus'),
          modifiedTime?: long(name='ModifiedTime', example='1629360780000'),
          occurTime?: long(name='OccurTime', example='1682493047418'),
          originalAsrResult?: string(name='OriginalAsrResult'),
          sequenceId?: string(name='SequenceId', example='1475140522'),
          subStatus?: int32(name='SubStatus', example='1'),
          tagAnnotationStatus?: int32(name='TagAnnotationStatus', example='1'),
          translationError?: int32(name='TranslationError', example='1'),
        }
      ](name='AnnotationMissionChatList'),
      annotationMissionId?: string(name='AnnotationMissionId', example='c88cc004-de69-4eee-aa5f-2efed533a54e'),
      annotationMissionSessionId?: string(name='AnnotationMissionSessionId'),
      annotationStatus?: int32(name='AnnotationStatus', example='1'),
      createTime?: long(name='CreateTime', example='2023-04-14T02:01:23Z'),
      instanceId?: string(name='InstanceId', example='77343553-cbc2-4487-a35c-869f1e86c573'),
      jobGroupId?: string(name='JobGroupId', example='29e669bd-a9d1-4529-98cd-c2b0549bcf53'),
      jobId?: string(name='JobId', example='593aaf5e-1275-4add-9990-22696385dc6e'),
      modifiedTime?: long(name='ModifiedTime', example='1683858248778'),
      scriptId?: string(name='ScriptId', example='e4f32632-2e56-4399-9fec-47bdbaeefdf6'),
      sessionId?: string(name='SessionId', example='e6271044-b4b2-4ad8-ade4-c720be023538'),
    }
  ](name='AnnotationMissionSessionList'),
  annotationMissionSessionListJsonString?: string(name='AnnotationMissionSessionListJsonString', example='[]'),
  environment?: long(name='Environment', example='0'),
  userNick?: string(name='UserNick'),
}

model SaveAnnotationMissionSessionListResponseBody = {
  code?: string(name='Code', example='OK'),
  data?: {
    message?: string(name='Message'),
    messageList?: [ string ](name='MessageList'),
    saveAnnotationMissionSessionListRequest?: {
      annotationMissionSessionListJsonString?: string(name='AnnotationMissionSessionListJsonString'),
    }(name='SaveAnnotationMissionSessionListRequest'),
    success?: boolean(name='Success', example='true'),
  }(name='Data'),
  httpStatusCode?: int32(name='HttpStatusCode', example='200'),
  message?: string(name='Message'),
  requestId?: string(name='RequestId', example='76E93048-F90F-57B7-BD46-6097611A706D'),
  success?: boolean(name='Success', example='true'),
}

model SaveAnnotationMissionSessionListResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: SaveAnnotationMissionSessionListResponseBody(name='body'),
}

/**
 * @param request SaveAnnotationMissionSessionListRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return SaveAnnotationMissionSessionListResponse
 */
async function saveAnnotationMissionSessionListWithOptions(request: SaveAnnotationMissionSessionListRequest, runtime: Util.RuntimeOptions): SaveAnnotationMissionSessionListResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.agentId)) {
    query['AgentId'] = request.agentId;
  }
  if (!Util.isUnset(request.agentKey)) {
    query['AgentKey'] = request.agentKey;
  }
  if (!Util.isUnset(request.annotationMissionDataSourceType)) {
    query['AnnotationMissionDataSourceType'] = request.annotationMissionDataSourceType;
  }
  if (!Util.isUnset(request.annotationMissionSessionList)) {
    query['AnnotationMissionSessionList'] = request.annotationMissionSessionList;
  }
  if (!Util.isUnset(request.annotationMissionSessionListJsonString)) {
    query['AnnotationMissionSessionListJsonString'] = request.annotationMissionSessionListJsonString;
  }
  if (!Util.isUnset(request.environment)) {
    query['Environment'] = request.environment;
  }
  if (!Util.isUnset(request.userNick)) {
    query['UserNick'] = request.userNick;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'SaveAnnotationMissionSessionList',
    version = '2019-12-26',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @param request SaveAnnotationMissionSessionListRequest
 * @return SaveAnnotationMissionSessionListResponse
 */
async function saveAnnotationMissionSessionList(request: SaveAnnotationMissionSessionListRequest): SaveAnnotationMissionSessionListResponse {
  var runtime = new Util.RuntimeOptions{};
  return saveAnnotationMissionSessionListWithOptions(request, runtime);
}

model SaveAnnotationMissionTagInfoListRequest {
  annotationMissionTagInfoList?: [ 
    {
      annotationMissionTagInfoDescription?: string(name='AnnotationMissionTagInfoDescription'),
      annotationMissionTagInfoId?: string(name='AnnotationMissionTagInfoId', description='tag id'),
      annotationMissionTagInfoName?: string(name='AnnotationMissionTagInfoName'),
      delete?: boolean(name='Delete', example='true'),
      instanceId?: string(name='InstanceId', example='bdbff6a5-1f68-4b41-8d37-6ff805ce165a'),
      tenantId?: string(name='TenantId', example='bdbff6a5-1f68-4b41-8d37-6ff805ce165a'),
    }
  ](name='AnnotationMissionTagInfoList'),
  annotationMissionTagInfoListJsonString?: string(name='AnnotationMissionTagInfoListJsonString', example='[]'),
  instanceId?: string(name='InstanceId', example='af81a389-91f0-4157-8d82-720edd02b66a'),
  reset?: boolean(name='Reset', example='false'),
}

model SaveAnnotationMissionTagInfoListResponseBody = {
  code?: string(name='Code', example='OK'),
  data?: {
    execCount?: int32(name='ExecCount'),
    message?: string(name='Message'),
    success?: boolean(name='Success', example='true'),
  }(name='Data'),
  httpStatusCode?: int32(name='HttpStatusCode', example='200'),
  message?: string(name='Message'),
  requestId?: string(name='RequestId', example='1B356EDC-F69A-53B0-B4AF-2AC42200684E'),
  success?: boolean(name='Success', example='true'),
}

model SaveAnnotationMissionTagInfoListResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: SaveAnnotationMissionTagInfoListResponseBody(name='body'),
}

/**
 * @param request SaveAnnotationMissionTagInfoListRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return SaveAnnotationMissionTagInfoListResponse
 */
async function saveAnnotationMissionTagInfoListWithOptions(request: SaveAnnotationMissionTagInfoListRequest, runtime: Util.RuntimeOptions): SaveAnnotationMissionTagInfoListResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.annotationMissionTagInfoList)) {
    query['AnnotationMissionTagInfoList'] = request.annotationMissionTagInfoList;
  }
  if (!Util.isUnset(request.annotationMissionTagInfoListJsonString)) {
    query['AnnotationMissionTagInfoListJsonString'] = request.annotationMissionTagInfoListJsonString;
  }
  if (!Util.isUnset(request.instanceId)) {
    query['InstanceId'] = request.instanceId;
  }
  if (!Util.isUnset(request.reset)) {
    query['Reset'] = request.reset;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'SaveAnnotationMissionTagInfoList',
    version = '2019-12-26',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @param request SaveAnnotationMissionTagInfoListRequest
 * @return SaveAnnotationMissionTagInfoListResponse
 */
async function saveAnnotationMissionTagInfoList(request: SaveAnnotationMissionTagInfoListRequest): SaveAnnotationMissionTagInfoListResponse {
  var runtime = new Util.RuntimeOptions{};
  return saveAnnotationMissionTagInfoListWithOptions(request, runtime);
}

model SaveBaseStrategyPeriodRequest {
  entryId?: string(name='EntryId', description='This parameter is required.', example='fe51eca2-a904-4b4d-b3ff-31be334b9500'),
  onlyWeekdays?: boolean(name='OnlyWeekdays', example='false'),
  onlyWorkdays?: boolean(name='OnlyWorkdays'),
  strategyLevel?: int32(name='StrategyLevel', example='2'),
  workingTime?: [ string ](name='WorkingTime', example='[]'),
  workingTimeFramesJson?: string(name='WorkingTimeFramesJson', example='[{\\\\"beginTime\\\\":\\\\"09:00:00\\\\",\\\\"beginTimeMillis\\\\":324000000000,\\\\"endTime\\\\":\\\\"21:00:00\\\\",\\\\"endTimeMillis\\\\":756000000000}]'),
}

model SaveBaseStrategyPeriodResponseBody = {
  code?: string(name='Code', example='OK'),
  httpStatusCode?: int32(name='HttpStatusCode', example='200'),
  message?: string(name='Message', example='Success'),
  requestId?: string(name='RequestId', example='254EB995-DEDF-48A4-9101-9CA5B72FFBCC'),
  success?: boolean(name='Success', example='true'),
}

model SaveBaseStrategyPeriodResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: SaveBaseStrategyPeriodResponseBody(name='body'),
}

/**
 * @param request SaveBaseStrategyPeriodRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return SaveBaseStrategyPeriodResponse
 */
async function saveBaseStrategyPeriodWithOptions(request: SaveBaseStrategyPeriodRequest, runtime: Util.RuntimeOptions): SaveBaseStrategyPeriodResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.entryId)) {
    query['EntryId'] = request.entryId;
  }
  if (!Util.isUnset(request.onlyWeekdays)) {
    query['OnlyWeekdays'] = request.onlyWeekdays;
  }
  if (!Util.isUnset(request.onlyWorkdays)) {
    query['OnlyWorkdays'] = request.onlyWorkdays;
  }
  if (!Util.isUnset(request.strategyLevel)) {
    query['StrategyLevel'] = request.strategyLevel;
  }
  if (!Util.isUnset(request.workingTime)) {
    query['WorkingTime'] = request.workingTime;
  }
  if (!Util.isUnset(request.workingTimeFramesJson)) {
    query['WorkingTimeFramesJson'] = request.workingTimeFramesJson;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'SaveBaseStrategyPeriod',
    version = '2019-12-26',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @param request SaveBaseStrategyPeriodRequest
 * @return SaveBaseStrategyPeriodResponse
 */
async function saveBaseStrategyPeriod(request: SaveBaseStrategyPeriodRequest): SaveBaseStrategyPeriodResponse {
  var runtime = new Util.RuntimeOptions{};
  return saveBaseStrategyPeriodWithOptions(request, runtime);
}

model SaveContactBlockListRequest {
  contactBlockListList?: [ string ](name='ContactBlockListList', example='[]'),
  contactBlockListsJson?: string(name='ContactBlockListsJson', example='{}'),
  instanceId?: string(name='InstanceId', example='c3c92de8-e4bd-4db4-a962-50f8acce40bc'),
}

model SaveContactBlockListResponseBody = {
  affectedRows?: int32(name='AffectedRows', example='5'),
  code?: string(name='Code', example='OK'),
  httpStatusCode?: int32(name='HttpStatusCode', example='200'),
  message?: string(name='Message', example='Success'),
  requestId?: string(name='RequestId', example='254EB995-DEDF-48A4-9101-9CA5B72FFBCC'),
  success?: boolean(name='Success', example='true'),
}

model SaveContactBlockListResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: SaveContactBlockListResponseBody(name='body'),
}

/**
 * @param request SaveContactBlockListRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return SaveContactBlockListResponse
 */
async function saveContactBlockListWithOptions(request: SaveContactBlockListRequest, runtime: Util.RuntimeOptions): SaveContactBlockListResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.contactBlockListList)) {
    query['ContactBlockListList'] = request.contactBlockListList;
  }
  if (!Util.isUnset(request.contactBlockListsJson)) {
    query['ContactBlockListsJson'] = request.contactBlockListsJson;
  }
  if (!Util.isUnset(request.instanceId)) {
    query['InstanceId'] = request.instanceId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'SaveContactBlockList',
    version = '2019-12-26',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @param request SaveContactBlockListRequest
 * @return SaveContactBlockListResponse
 */
async function saveContactBlockList(request: SaveContactBlockListRequest): SaveContactBlockListResponse {
  var runtime = new Util.RuntimeOptions{};
  return saveContactBlockListWithOptions(request, runtime);
}

model SaveContactWhiteListRequest {
  contactWhiteListList?: [ string ](name='ContactWhiteListList', example='{}'),
  contactWhiteListsJson?: string(name='ContactWhiteListsJson', example='{}'),
  instanceId?: string(name='InstanceId', description='This parameter is required.', example='c415bb6c-2e6f-46aa-afd9-3b65b6dbe2bc'),
}

model SaveContactWhiteListResponseBody = {
  affectedRows?: int32(name='AffectedRows', example='10'),
  code?: string(name='Code', example='OK'),
  httpStatusCode?: int32(name='HttpStatusCode', example='200'),
  message?: string(name='Message', example='Success'),
  requestId?: string(name='RequestId', example='254EB995-DEDF-48A4-9101-9CA5B72FFBCC'),
  success?: boolean(name='Success', example='true'),
}

model SaveContactWhiteListResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: SaveContactWhiteListResponseBody(name='body'),
}

/**
 * @param request SaveContactWhiteListRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return SaveContactWhiteListResponse
 */
async function saveContactWhiteListWithOptions(request: SaveContactWhiteListRequest, runtime: Util.RuntimeOptions): SaveContactWhiteListResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.contactWhiteListList)) {
    query['ContactWhiteListList'] = request.contactWhiteListList;
  }
  if (!Util.isUnset(request.contactWhiteListsJson)) {
    query['ContactWhiteListsJson'] = request.contactWhiteListsJson;
  }
  if (!Util.isUnset(request.instanceId)) {
    query['InstanceId'] = request.instanceId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'SaveContactWhiteList',
    version = '2019-12-26',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @param request SaveContactWhiteListRequest
 * @return SaveContactWhiteListResponse
 */
async function saveContactWhiteList(request: SaveContactWhiteListRequest): SaveContactWhiteListResponse {
  var runtime = new Util.RuntimeOptions{};
  return saveContactWhiteListWithOptions(request, runtime);
}

model SaveEffectiveDaysRequest {
  effectiveDays?: int32(name='EffectiveDays', example='30'),
  entryId?: string(name='EntryId', description='This parameter is required.', example='e90b5b8e-c8b4-4182-b28d-a5aa81685e49'),
  strategyLevel?: int32(name='StrategyLevel', example='2'),
}

model SaveEffectiveDaysResponseBody = {
  code?: string(name='Code', example='OK'),
  httpStatusCode?: int32(name='HttpStatusCode', example='200'),
  message?: string(name='Message', example='Success'),
  requestId?: string(name='RequestId', example='254EB995-DEDF-48A4-9101-9CA5B72FFBCC'),
  success?: boolean(name='Success', example='true'),
}

model SaveEffectiveDaysResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: SaveEffectiveDaysResponseBody(name='body'),
}

/**
 * @param request SaveEffectiveDaysRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return SaveEffectiveDaysResponse
 */
async function saveEffectiveDaysWithOptions(request: SaveEffectiveDaysRequest, runtime: Util.RuntimeOptions): SaveEffectiveDaysResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.effectiveDays)) {
    query['EffectiveDays'] = request.effectiveDays;
  }
  if (!Util.isUnset(request.entryId)) {
    query['EntryId'] = request.entryId;
  }
  if (!Util.isUnset(request.strategyLevel)) {
    query['StrategyLevel'] = request.strategyLevel;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'SaveEffectiveDays',
    version = '2019-12-26',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @param request SaveEffectiveDaysRequest
 * @return SaveEffectiveDaysResponse
 */
async function saveEffectiveDays(request: SaveEffectiveDaysRequest): SaveEffectiveDaysResponse {
  var runtime = new Util.RuntimeOptions{};
  return saveEffectiveDaysWithOptions(request, runtime);
}

model SaveMaxAttemptsPerDayRequest {
  entryId?: string(name='EntryId', description='This parameter is required.', example='c8bf820a-6a8a-47bc-99bf-97593df8faa8'),
  maxAttemptsPerDay?: int32(name='MaxAttemptsPerDay', example='5'),
  strategyLevel?: int32(name='StrategyLevel', example='2'),
}

model SaveMaxAttemptsPerDayResponseBody = {
  code?: string(name='Code', example='OK'),
  httpStatusCode?: int32(name='HttpStatusCode', example='200'),
  message?: string(name='Message', example='Success'),
  requestId?: string(name='RequestId', example='254EB995-DEDF-48A4-9101-9CA5B72FFBCC'),
  success?: boolean(name='Success', example='true'),
}

model SaveMaxAttemptsPerDayResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: SaveMaxAttemptsPerDayResponseBody(name='body'),
}

/**
 * @param request SaveMaxAttemptsPerDayRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return SaveMaxAttemptsPerDayResponse
 */
async function saveMaxAttemptsPerDayWithOptions(request: SaveMaxAttemptsPerDayRequest, runtime: Util.RuntimeOptions): SaveMaxAttemptsPerDayResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.entryId)) {
    query['EntryId'] = request.entryId;
  }
  if (!Util.isUnset(request.maxAttemptsPerDay)) {
    query['MaxAttemptsPerDay'] = request.maxAttemptsPerDay;
  }
  if (!Util.isUnset(request.strategyLevel)) {
    query['StrategyLevel'] = request.strategyLevel;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'SaveMaxAttemptsPerDay',
    version = '2019-12-26',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @param request SaveMaxAttemptsPerDayRequest
 * @return SaveMaxAttemptsPerDayResponse
 */
async function saveMaxAttemptsPerDay(request: SaveMaxAttemptsPerDayRequest): SaveMaxAttemptsPerDayResponse {
  var runtime = new Util.RuntimeOptions{};
  return saveMaxAttemptsPerDayWithOptions(request, runtime);
}

model SearchTaskRequest {
  actualTimeGte?: long(name='ActualTimeGte', example='1646582400000'),
  actualTimeLte?: long(name='ActualTimeLte', example='1643126399000'),
  callDurationGte?: long(name='CallDurationGte', example='12341155'),
  callDurationLte?: long(name='CallDurationLte', example='12341155'),
  calledNumber?: string(name='CalledNumber', example='15126426342'),
  instanceId?: string(name='InstanceId', description='This parameter is required.', example='d481cebe-0bb6-4d13-9649-42ce5074fb75'),
  jobGroupId?: string(name='JobGroupId', example='3a30ae7c-27b2-4305-9444-7185ced9d51f'),
  jobGroupNameQuery?: string(name='JobGroupNameQuery'),
  jobId?: string(name='JobId', example='11994321-e6bc-47bb-8b1c-8eef8f2f768b'),
  jobStatusStringList?: string(name='JobStatusStringList', example='Succeeded'),
  otherId?: string(name='OtherId', example='AVD-2021-39685'),
  pageIndex?: int32(name='PageIndex', example='2'),
  pageSize?: int32(name='PageSize', example='10'),
  recordingDurationGte?: long(name='RecordingDurationGte', example='10'),
  recordingDurationLte?: long(name='RecordingDurationLte', example='60'),
  scriptNameQuery?: string(name='ScriptNameQuery'),
  sortBy?: string(name='SortBy', example='actualTime'),
  sortOrder?: string(name='SortOrder', example='desc'),
  taskCreateTimeGte?: long(name='TaskCreateTimeGte', example='1646792941'),
  taskCreateTimeLte?: long(name='TaskCreateTimeLte', example='1646792941'),
  taskId?: string(name='TaskId', example='744b27f3-437f-4a8c-a181-f668e492fd24'),
  taskStatusStringList?: string(name='TaskStatusStringList', example='Succeeded'),
  userIdMatch?: string(name='UserIdMatch', example='12341155'),
}

model SearchTaskResponseBody = {
  code?: string(name='Code', example='OK'),
  httpStatusCode?: int32(name='HttpStatusCode', example='200'),
  message?: string(name='Message', example='Success'),
  pageIndex?: int32(name='PageIndex', example='0'),
  pageSize?: int32(name='PageSize', example='10'),
  requestId?: string(name='RequestId', example='254EB995-DEDF-48A4-9101-9CA5B72FFBCC'),
  searchTaskInfoList?: [ 
    {
      actualTime?: long(name='ActualTime', example='1643436089677'),
      callDuration?: int32(name='CallDuration', example='1646792941'),
      callDurationDisplay?: string(name='CallDurationDisplay', example='ActualTime'),
      calledNumber?: string(name='CalledNumber', example='15205879599'),
      dialException?: string(name='DialException', example='[{"code":"OutboundCallError.SipCodeError", "params":[{"key":"SipCode","value":"500"}]}]'),
      dialExceptionCodes?: [ string ](name='DialExceptionCodes'),
      dialExceptionOld?: string(name='DialExceptionOld', example='["OutboundCallError.SipTrunkError"]'),
      hasAnswered?: boolean(name='HasAnswered', example='true'),
      hasHangUpByRejection?: boolean(name='HasHangUpByRejection', example='true'),
      hasLastPlaybackCompleted?: boolean(name='HasLastPlaybackCompleted', example='true'),
      hasReachedEndOfFlow?: boolean(name='HasReachedEndOfFlow', example='true'),
      instanceId?: string(name='InstanceId', example='73df6283-26b2-402d-bad0-ffa489923ea1'),
      jobGroupId?: string(name='JobGroupId', example='37db3113-ad34-4ba3-b930-468f016bbf95'),
      jobGroupName?: string(name='JobGroupName'),
      jobId?: string(name='JobId', example='6203248e-e652-4ef8-a1eb-586ed7b54dc2'),
      jobStatus?: int32(name='JobStatus', example='Succeeded'),
      jobStatusName?: string(name='JobStatusName', example='xxx'),
      jobStatusString?: string(name='JobStatusString', example='Scheduling'),
      recordingDuration?: int32(name='RecordingDuration', example='10'),
      scriptName?: string(name='ScriptName'),
      taskCreateTime?: long(name='TaskCreateTime', example='1646792941'),
      taskEndReason?: int32(name='TaskEndReason', example='OutOfService'),
      taskId?: string(name='TaskId', example='479aea04-3a92-4ac3-935d-c8798c667850'),
      taskStatus?: int32(name='TaskStatus', example='Success'),
      taskStatusName?: string(name='TaskStatusName', example='xxxx'),
      taskStatusString?: string(name='TaskStatusString', example='Executing'),
      userId?: string(name='UserId', example='12334134'),
      userName?: string(name='UserName', example='xxx'),
    }
  ](name='SearchTaskInfoList', example='[]'),
  success?: boolean(name='Success', example='true'),
  total?: long(name='Total', example='2'),
}

model SearchTaskResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: SearchTaskResponseBody(name='body'),
}

/**
 * @param request SearchTaskRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return SearchTaskResponse
 */
async function searchTaskWithOptions(request: SearchTaskRequest, runtime: Util.RuntimeOptions): SearchTaskResponse {
  Util.validateModel(request);
  var query = OpenApiUtil.query(Util.toMap(request));
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'SearchTask',
    version = '2019-12-26',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'GET',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @param request SearchTaskRequest
 * @return SearchTaskResponse
 */
async function searchTask(request: SearchTaskRequest): SearchTaskResponse {
  var runtime = new Util.RuntimeOptions{};
  return searchTaskWithOptions(request, runtime);
}

model StartJobRequest {
  callingNumber?: [ string ](name='CallingNumber', example='10086'),
  instanceId?: string(name='InstanceId', description='This parameter is required.', example='da37319b-6c83-4268-9f19-814aed62e401'),
  jobGroupId?: string(name='JobGroupId', example='4f21446e-324e-46f2-bf62-7f341fb004ea'),
  jobJson?: string(name='JobJson', description='This parameter is required.'),
  scenarioId?: string(name='ScenarioId', example='af81a389-91f0-4157-8d82-720edd02b66a'),
  scriptId?: string(name='ScriptId', example='b9ff4e88-65f9-4eb3-987c-11ba51f3f24d'),
}

model StartJobResponseBody = {
  callIds?: [ 
    {
      key?: string(name='Key', example='c93cdd1c-f9b5-4758-be43-7a237a7eaa1d'),
      value?: string(name='Value', example='62229628-45d8-41bd-a80f-6e4c0a39f79b'),
    }
  ](name='CallIds'),
  code?: string(name='Code', example='OK'),
  httpStatusCode?: int32(name='HttpStatusCode', example='200'),
  message?: string(name='Message', example='Success'),
  requestId?: string(name='RequestId', example='8a621aa1-d2e7-43f3-b54d-8830af73c468'),
  success?: boolean(name='Success', example='true'),
  taskIds?: [ 
    {
      key?: string(name='Key', example='c93cdd1c-f9b5-4758-be43-7a237a7eaa1d'),
      value?: string(name='Value', example='62229628-45d8-41bd-a80f-6e4c0a39f79b'),
    }
  ](name='TaskIds'),
}

model StartJobResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: StartJobResponseBody(name='body'),
}

/**
 * @param request StartJobRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return StartJobResponse
 */
async function startJobWithOptions(request: StartJobRequest, runtime: Util.RuntimeOptions): StartJobResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.callingNumber)) {
    query['CallingNumber'] = request.callingNumber;
  }
  if (!Util.isUnset(request.instanceId)) {
    query['InstanceId'] = request.instanceId;
  }
  if (!Util.isUnset(request.jobGroupId)) {
    query['JobGroupId'] = request.jobGroupId;
  }
  if (!Util.isUnset(request.jobJson)) {
    query['JobJson'] = request.jobJson;
  }
  if (!Util.isUnset(request.scenarioId)) {
    query['ScenarioId'] = request.scenarioId;
  }
  if (!Util.isUnset(request.scriptId)) {
    query['ScriptId'] = request.scriptId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'StartJob',
    version = '2019-12-26',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @param request StartJobRequest
 * @return StartJobResponse
 */
async function startJob(request: StartJobRequest): StartJobResponse {
  var runtime = new Util.RuntimeOptions{};
  return startJobWithOptions(request, runtime);
}

model SubmitBatchJobsRequest {
  instanceId?: string(name='InstanceId', description='This parameter is required.', example='af81a389-91f0-4157-8d82-720edd02b66a'),
  jobGroupId?: string(name='JobGroupId', description='This parameter is required.', example='6b3ea2a1-32b3-4041-842b-9bde5de9dda0'),
}

model SubmitBatchJobsResponseBody = {
  code?: string(name='Code', example='OK'),
  httpStatusCode?: int32(name='HttpStatusCode', example='200'),
  message?: string(name='Message', example='Success'),
  requestId?: string(name='RequestId', example='254EB995-DEDF-48A4-9101-9CA5B72FFBCC'),
  success?: boolean(name='Success', example='true'),
}

model SubmitBatchJobsResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: SubmitBatchJobsResponseBody(name='body'),
}

/**
 * @param request SubmitBatchJobsRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return SubmitBatchJobsResponse
 */
async function submitBatchJobsWithOptions(request: SubmitBatchJobsRequest, runtime: Util.RuntimeOptions): SubmitBatchJobsResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.instanceId)) {
    query['InstanceId'] = request.instanceId;
  }
  if (!Util.isUnset(request.jobGroupId)) {
    query['JobGroupId'] = request.jobGroupId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'SubmitBatchJobs',
    version = '2019-12-26',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @param request SubmitBatchJobsRequest
 * @return SubmitBatchJobsResponse
 */
async function submitBatchJobs(request: SubmitBatchJobsRequest): SubmitBatchJobsResponse {
  var runtime = new Util.RuntimeOptions{};
  return submitBatchJobsWithOptions(request, runtime);
}

model SubmitRecordingRequest {
  instanceId?: string(name='InstanceId', description='This parameter is required.', example='af81a389-91f0-4157-8d82-720edd02b66a'),
  mergedRecording?: string(name='MergedRecording', description='This parameter is required.', example='{"contactId":"3d35c0487cc041abb7ad0ce61752601f","duration":27,"fileName":"ce2659e5-a20b-4f8e-91b5-5cd909c6b96e_3d35c0487cc041abb7ad0ce61752601f.wav","filePath":"oss://ForCompatibility/waveforms/","startTime":1579057583670,"type":"Merged"}'),
  resourceRecording?: string(name='ResourceRecording', example='{"contactId":"3d35c0487cc041abb7ad0ce61752601f","duration":27,"fileName":"ce2659e5-a20b-4f8e-91b5-5cd909c6b96e_3d35c0487cc041abb7ad0ce61752601f.wav","filePath":"oss://ForCompatibility/waveforms/","startTime":1579057583670,"type":"Source"}'),
  taskId?: string(name='TaskId', description='This parameter is required.', example='e4e2a770-b97b-465a-80d8-06dca008c503'),
}

model SubmitRecordingResponseBody = {
  code?: string(name='Code', example='OK'),
  httpStatusCode?: int32(name='HttpStatusCode', example='200'),
  message?: string(name='Message', example='Success'),
  requestId?: string(name='RequestId', example='254EB995-DEDF-48A4-9101-9CA5B72FFBCC'),
  success?: boolean(name='Success', example='true'),
}

model SubmitRecordingResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: SubmitRecordingResponseBody(name='body'),
}

/**
 * @param request SubmitRecordingRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return SubmitRecordingResponse
 */
async function submitRecordingWithOptions(request: SubmitRecordingRequest, runtime: Util.RuntimeOptions): SubmitRecordingResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.instanceId)) {
    query['InstanceId'] = request.instanceId;
  }
  if (!Util.isUnset(request.mergedRecording)) {
    query['MergedRecording'] = request.mergedRecording;
  }
  if (!Util.isUnset(request.resourceRecording)) {
    query['ResourceRecording'] = request.resourceRecording;
  }
  if (!Util.isUnset(request.taskId)) {
    query['TaskId'] = request.taskId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'SubmitRecording',
    version = '2019-12-26',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @param request SubmitRecordingRequest
 * @return SubmitRecordingResponse
 */
async function submitRecording(request: SubmitRecordingRequest): SubmitRecordingResponse {
  var runtime = new Util.RuntimeOptions{};
  return submitRecordingWithOptions(request, runtime);
}

model SubmitScriptReviewRequest {
  description?: string(name='Description', description='This parameter is required.'),
  from?: string(name='From'),
  instanceId?: string(name='InstanceId', description='This parameter is required.', example='af81a389-91f0-4157-8d82-720edd02b66a'),
  scriptId?: string(name='ScriptId', description='This parameter is required.', example='b0f35dd1-0337-402e-9c4f-3a6c2426950a'),
}

model SubmitScriptReviewResponseBody = {
  code?: string(name='Code', example='OK'),
  httpStatusCode?: int32(name='HttpStatusCode', example='200'),
  message?: string(name='Message', example='Success'),
  requestId?: string(name='RequestId', example='254EB995-DEDF-48A4-9101-9CA5B72FFBCC'),
  success?: boolean(name='Success', example='true'),
}

model SubmitScriptReviewResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: SubmitScriptReviewResponseBody(name='body'),
}

/**
 * @param request SubmitScriptReviewRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return SubmitScriptReviewResponse
 */
async function submitScriptReviewWithOptions(request: SubmitScriptReviewRequest, runtime: Util.RuntimeOptions): SubmitScriptReviewResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.description)) {
    query['Description'] = request.description;
  }
  if (!Util.isUnset(request.from)) {
    query['From'] = request.from;
  }
  if (!Util.isUnset(request.instanceId)) {
    query['InstanceId'] = request.instanceId;
  }
  if (!Util.isUnset(request.scriptId)) {
    query['ScriptId'] = request.scriptId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'SubmitScriptReview',
    version = '2019-12-26',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @param request SubmitScriptReviewRequest
 * @return SubmitScriptReviewResponse
 */
async function submitScriptReview(request: SubmitScriptReviewRequest): SubmitScriptReviewResponse {
  var runtime = new Util.RuntimeOptions{};
  return submitScriptReviewWithOptions(request, runtime);
}

model SuspendCallRequest {
  calledNumbers?: [ string ](name='CalledNumbers', example='[]'),
  groupId?: string(name='GroupId', example='f745881b-343d-43e4-9c51-31b7b063031c'),
  instanceId?: string(name='InstanceId', description='This parameter is required.', example='a5fc6490-ef1e-4666-870a-07a4e586c414'),
}

model SuspendCallResponseBody = {
  code?: string(name='Code', example='OK'),
  httpStatusCode?: int32(name='HttpStatusCode', example='200'),
  message?: string(name='Message', example='Success'),
  requestId?: string(name='RequestId', example='254EB995-DEDF-48A4-9101-9CA5B72FFBCC'),
  success?: boolean(name='Success', example='true'),
}

model SuspendCallResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: SuspendCallResponseBody(name='body'),
}

/**
 * @param request SuspendCallRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return SuspendCallResponse
 */
async function suspendCallWithOptions(request: SuspendCallRequest, runtime: Util.RuntimeOptions): SuspendCallResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.calledNumbers)) {
    query['CalledNumbers'] = request.calledNumbers;
  }
  if (!Util.isUnset(request.groupId)) {
    query['GroupId'] = request.groupId;
  }
  if (!Util.isUnset(request.instanceId)) {
    query['InstanceId'] = request.instanceId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'SuspendCall',
    version = '2019-12-26',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @param request SuspendCallRequest
 * @return SuspendCallResponse
 */
async function suspendCall(request: SuspendCallRequest): SuspendCallResponse {
  var runtime = new Util.RuntimeOptions{};
  return suspendCallWithOptions(request, runtime);
}

model SuspendCallWithFileRequest {
  filePath?: string(name='FilePath', example='xxxx'),
  groupId?: string(name='GroupId', example='0197261b-30e6-467b-83d6-7f72af868b03'),
  instanceId?: string(name='InstanceId', example='a4274627-265f-4e14-b2d6-4ee7d4f8593e'),
}

model SuspendCallWithFileResponseBody = {
  code?: string(name='Code', example='OK'),
  httpStatusCode?: int32(name='HttpStatusCode', example='200'),
  message?: string(name='Message', example='Success'),
  requestId?: string(name='RequestId', example='254EB995-DEDF-48A4-9101-9CA5B72FFBCC'),
  success?: boolean(name='Success', example='true'),
}

model SuspendCallWithFileResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: SuspendCallWithFileResponseBody(name='body'),
}

/**
 * @param request SuspendCallWithFileRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return SuspendCallWithFileResponse
 */
async function suspendCallWithFileWithOptions(request: SuspendCallWithFileRequest, runtime: Util.RuntimeOptions): SuspendCallWithFileResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.filePath)) {
    query['FilePath'] = request.filePath;
  }
  if (!Util.isUnset(request.groupId)) {
    query['GroupId'] = request.groupId;
  }
  if (!Util.isUnset(request.instanceId)) {
    query['InstanceId'] = request.instanceId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'SuspendCallWithFile',
    version = '2019-12-26',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @param request SuspendCallWithFileRequest
 * @return SuspendCallWithFileResponse
 */
async function suspendCallWithFile(request: SuspendCallWithFileRequest): SuspendCallWithFileResponse {
  var runtime = new Util.RuntimeOptions{};
  return suspendCallWithFileWithOptions(request, runtime);
}

model SuspendJobsRequest {
  all?: boolean(name='All', description='This parameter is required.', example='false'),
  instanceId?: string(name='InstanceId', description='This parameter is required.', example='af81a389-91f0-4157-8d82-720edd02b66a'),
  jobGroupId?: string(name='JobGroupId', example='6b3ea2a1-32b3-4041-842b-9bde5de9dda0'),
  jobId?: [ string ](name='JobId', example='11994321-e6bc-47bb-8b1c-8eef8f2f768b'),
  jobReferenceId?: [ string ](name='JobReferenceId', example='de3ab269-6746-477c-b13d-bd49f13202c2'),
  scenarioId?: string(name='ScenarioId', example='4b6dd926-3cc3-4111-a333-15d9b006fe81'),
}

model SuspendJobsResponseBody = {
  code?: string(name='Code', example='OK'),
  httpStatusCode?: int32(name='HttpStatusCode', example='200'),
  message?: string(name='Message', example='Success'),
  requestId?: string(name='RequestId', example='254EB995-DEDF-48A4-9101-9CA5B72FFBCC'),
  success?: boolean(name='Success', example='true'),
}

model SuspendJobsResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: SuspendJobsResponseBody(name='body'),
}

/**
 * @param request SuspendJobsRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return SuspendJobsResponse
 */
async function suspendJobsWithOptions(request: SuspendJobsRequest, runtime: Util.RuntimeOptions): SuspendJobsResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.all)) {
    query['All'] = request.all;
  }
  if (!Util.isUnset(request.instanceId)) {
    query['InstanceId'] = request.instanceId;
  }
  if (!Util.isUnset(request.jobGroupId)) {
    query['JobGroupId'] = request.jobGroupId;
  }
  if (!Util.isUnset(request.jobId)) {
    query['JobId'] = request.jobId;
  }
  if (!Util.isUnset(request.jobReferenceId)) {
    query['JobReferenceId'] = request.jobReferenceId;
  }
  if (!Util.isUnset(request.scenarioId)) {
    query['ScenarioId'] = request.scenarioId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'SuspendJobs',
    version = '2019-12-26',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @param request SuspendJobsRequest
 * @return SuspendJobsResponse
 */
async function suspendJobs(request: SuspendJobsRequest): SuspendJobsResponse {
  var runtime = new Util.RuntimeOptions{};
  return suspendJobsWithOptions(request, runtime);
}

model TagResourcesRequest {
  regionId?: string(name='RegionId', description='This parameter is required.', example='cn-shanghai'),
  resourceId?: [ string ](name='ResourceId', description='This parameter is required.', example='ResourceId.1=b949ae1f-01dc-4191-ae5a-70fbe6772fd8'),
  resourceType?: string(name='ResourceType', description='This parameter is required.', example='instance'),
  tag?: [ 
    {
      key?: string(name='Key', example='Tag.1.Key=key1'),
      value?: string(name='Value', example='Tag.1.Value=value1'),
    }
  ](name='Tag', description='This parameter is required.'),
}

model TagResourcesResponseBody = {
  code?: string(name='Code', example='OK'),
  httpStatusCode?: int32(name='HttpStatusCode', example='200'),
  message?: string(name='Message', example='Success'),
  requestId?: string(name='RequestId', example='254EB995-DEDF-48A4-9101-9CA5B72FFBCC'),
  success?: boolean(name='Success', example='true'),
}

model TagResourcesResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: TagResourcesResponseBody(name='body'),
}

/**
 * @description **
 *
 * @param request TagResourcesRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return TagResourcesResponse
 */
async function tagResourcesWithOptions(request: TagResourcesRequest, runtime: Util.RuntimeOptions): TagResourcesResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.regionId)) {
    query['RegionId'] = request.regionId;
  }
  if (!Util.isUnset(request.resourceId)) {
    query['ResourceId'] = request.resourceId;
  }
  if (!Util.isUnset(request.resourceType)) {
    query['ResourceType'] = request.resourceType;
  }
  if (!Util.isUnset(request.tag)) {
    query['Tag'] = request.tag;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'TagResources',
    version = '2019-12-26',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @description **
 *
 * @param request TagResourcesRequest
 * @return TagResourcesResponse
 */
async function tagResources(request: TagResourcesRequest): TagResourcesResponse {
  var runtime = new Util.RuntimeOptions{};
  return tagResourcesWithOptions(request, runtime);
}

model TaskPreparingRequest {
  instanceId?: string(name='InstanceId', description='This parameter is required.', example='33040b9a-b04b-452f-b554-cd6f3a15f850'),
  instanceOwnerId?: long(name='InstanceOwnerId', example='1971226538081821'),
  jobId?: string(name='JobId', description='This parameter is required.', example='c9e42cd7-ba99-4872-9802-e05719ab051c'),
}

model TaskPreparingResponseBody = {
  code?: string(name='Code', example='OK'),
  httpStatusCode?: int32(name='HttpStatusCode', example='200'),
  message?: string(name='Message', example='Succes'),
  requestId?: string(name='RequestId', example='254EB995-DEDF-48A4-9101-9CA5B72FFBCC'),
  success?: boolean(name='Success', example='true'),
  taskId?: string(name='TaskId', example='e4e2a770-b97b-465a-80d8-06dca008c503'),
}

model TaskPreparingResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: TaskPreparingResponseBody(name='body'),
}

/**
 * @summary TaskPreparing
 *
 * @param request TaskPreparingRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return TaskPreparingResponse
 */
async function taskPreparingWithOptions(request: TaskPreparingRequest, runtime: Util.RuntimeOptions): TaskPreparingResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.instanceId)) {
    query['InstanceId'] = request.instanceId;
  }
  if (!Util.isUnset(request.instanceOwnerId)) {
    query['InstanceOwnerId'] = request.instanceOwnerId;
  }
  if (!Util.isUnset(request.jobId)) {
    query['JobId'] = request.jobId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'TaskPreparing',
    version = '2019-12-26',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary TaskPreparing
 *
 * @param request TaskPreparingRequest
 * @return TaskPreparingResponse
 */
async function taskPreparing(request: TaskPreparingRequest): TaskPreparingResponse {
  var runtime = new Util.RuntimeOptions{};
  return taskPreparingWithOptions(request, runtime);
}

model TerminateCallRequest {
  callId?: string(name='CallId', description='This parameter is required.', example='1528189846043'),
  instanceId?: string(name='InstanceId', description='This parameter is required.', example='174952ab-9825-4cc9-a5e2-de82d7fa4cdd'),
}

model TerminateCallResponseBody = {
  code?: string(name='Code', example='OK'),
  httpStatusCode?: int32(name='HttpStatusCode', example='200'),
  message?: string(name='Message', example='Success'),
  requestId?: string(name='RequestId', example='254EB995-DEDF-48A4-9101-9CA5B72FFBCC'),
  success?: boolean(name='Success', example='true'),
}

model TerminateCallResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: TerminateCallResponseBody(name='body'),
}

/**
 * @param request TerminateCallRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return TerminateCallResponse
 */
async function terminateCallWithOptions(request: TerminateCallRequest, runtime: Util.RuntimeOptions): TerminateCallResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.callId)) {
    query['CallId'] = request.callId;
  }
  if (!Util.isUnset(request.instanceId)) {
    query['InstanceId'] = request.instanceId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'TerminateCall',
    version = '2019-12-26',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @param request TerminateCallRequest
 * @return TerminateCallResponse
 */
async function terminateCall(request: TerminateCallRequest): TerminateCallResponse {
  var runtime = new Util.RuntimeOptions{};
  return terminateCallWithOptions(request, runtime);
}

model UntagResourcesRequest {
  all?: boolean(name='All', example='false'),
  regionId?: string(name='RegionId', description='This parameter is required.', example='cn-shanghai'),
  resourceId?: [ string ](name='ResourceId', description='This parameter is required.'),
  resourceType?: string(name='ResourceType', description='This parameter is required.', example='instance'),
  tagKey?: [ string ](name='TagKey'),
}

model UntagResourcesResponseBody = {
  code?: string(name='Code', example='OK'),
  httpStatusCode?: int32(name='HttpStatusCode', example='200'),
  message?: string(name='Message', example='Success'),
  requestId?: string(name='RequestId', example='254EB995-DEDF-48A4-9101-9CA5B72FFBCC'),
  success?: boolean(name='Success', example='true'),
}

model UntagResourcesResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: UntagResourcesResponseBody(name='body'),
}

/**
 * @param request UntagResourcesRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return UntagResourcesResponse
 */
async function untagResourcesWithOptions(request: UntagResourcesRequest, runtime: Util.RuntimeOptions): UntagResourcesResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.all)) {
    query['All'] = request.all;
  }
  if (!Util.isUnset(request.regionId)) {
    query['RegionId'] = request.regionId;
  }
  if (!Util.isUnset(request.resourceId)) {
    query['ResourceId'] = request.resourceId;
  }
  if (!Util.isUnset(request.resourceType)) {
    query['ResourceType'] = request.resourceType;
  }
  if (!Util.isUnset(request.tagKey)) {
    query['TagKey'] = request.tagKey;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'UntagResources',
    version = '2019-12-26',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @param request UntagResourcesRequest
 * @return UntagResourcesResponse
 */
async function untagResources(request: UntagResourcesRequest): UntagResourcesResponse {
  var runtime = new Util.RuntimeOptions{};
  return untagResourcesWithOptions(request, runtime);
}

model UploadScriptRecordingRequest {
  content?: string(name='Content', description='This parameter is required.'),
  fileId?: string(name='FileId', description='This parameter is required.', example='cab_script_recording/upload/88a56c18-3dc8-4338-9116-911deb169780/hello.wav'),
  fileName?: string(name='FileName', description='This parameter is required.', example='hello.wav'),
  instanceId?: string(name='InstanceId', description='This parameter is required.', example='c209abb3-6804-4a75-b2c7-dd55c8c61b6a'),
  scriptId?: string(name='ScriptId', description='This parameter is required.', example='d004cfd2-6a81-491c-83c6-cbe186620c95'),
}

model UploadScriptRecordingResponseBody = {
  code?: string(name='Code', example='OK'),
  httpStatusCode?: int32(name='HttpStatusCode', example='200'),
  message?: string(name='Message', example='Success'),
  requestId?: string(name='RequestId', example='254EB995-DEDF-48A4-9101-9CA5B72FFBCC'),
  success?: boolean(name='Success', example='true'),
  uuid?: string(name='Uuid', example='5feaab8a-97fd-4720-8108-79e017f2d3ac'),
}

model UploadScriptRecordingResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: UploadScriptRecordingResponseBody(name='body'),
}

/**
 * @param request UploadScriptRecordingRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return UploadScriptRecordingResponse
 */
async function uploadScriptRecordingWithOptions(request: UploadScriptRecordingRequest, runtime: Util.RuntimeOptions): UploadScriptRecordingResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.content)) {
    query['Content'] = request.content;
  }
  if (!Util.isUnset(request.fileId)) {
    query['FileId'] = request.fileId;
  }
  if (!Util.isUnset(request.fileName)) {
    query['FileName'] = request.fileName;
  }
  if (!Util.isUnset(request.instanceId)) {
    query['InstanceId'] = request.instanceId;
  }
  if (!Util.isUnset(request.scriptId)) {
    query['ScriptId'] = request.scriptId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'UploadScriptRecording',
    version = '2019-12-26',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @param request UploadScriptRecordingRequest
 * @return UploadScriptRecordingResponse
 */
async function uploadScriptRecording(request: UploadScriptRecordingRequest): UploadScriptRecordingResponse {
  var runtime = new Util.RuntimeOptions{};
  return uploadScriptRecordingWithOptions(request, runtime);
}

model WithdrawScriptReviewRequest {
  instanceId?: string(name='InstanceId', description='This parameter is required.', example='38d2e8ed-04e9-4dac-83b5-a8e57642ef13'),
  scriptId?: string(name='ScriptId', description='This parameter is required.', example='e4e2a770-b97b-465a-80d8-06dca008c503'),
}

model WithdrawScriptReviewResponseBody = {
  code?: string(name='Code', example='OK'),
  httpStatusCode?: int32(name='HttpStatusCode', example='200'),
  message?: string(name='Message', example='Success'),
  requestId?: string(name='RequestId', example='254EB995-DEDF-48A4-9101-9CA5B72FFBCC'),
  script?: {
    debugStatus?: string(name='DebugStatus', example='PUBLISHED'),
    industry?: string(name='Industry'),
    isDebugDrafted?: boolean(name='IsDebugDrafted', example='false'),
    isDrafted?: boolean(name='IsDrafted', example='false'),
    scene?: string(name='Scene'),
    scriptDescription?: string(name='ScriptDescription'),
    scriptId?: string(name='ScriptId', example='e4e2a770-b97b-465a-80d8-06dca008c503'),
    scriptName?: string(name='ScriptName'),
    status?: string(name='Status', example='PUBLISHED'),
    updateTime?: long(name='UpdateTime', example='1578881227000'),
  }(name='Script'),
  success?: boolean(name='Success', example='true'),
}

model WithdrawScriptReviewResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: WithdrawScriptReviewResponseBody(name='body'),
}

/**
 * @summary WithdrawScriptReview
 *
 * @description ****
 *
 * @param request WithdrawScriptReviewRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return WithdrawScriptReviewResponse
 */
async function withdrawScriptReviewWithOptions(request: WithdrawScriptReviewRequest, runtime: Util.RuntimeOptions): WithdrawScriptReviewResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.instanceId)) {
    query['InstanceId'] = request.instanceId;
  }
  if (!Util.isUnset(request.scriptId)) {
    query['ScriptId'] = request.scriptId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'WithdrawScriptReview',
    version = '2019-12-26',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary WithdrawScriptReview
 *
 * @description ****
 *
 * @param request WithdrawScriptReviewRequest
 * @return WithdrawScriptReviewResponse
 */
async function withdrawScriptReview(request: WithdrawScriptReviewRequest): WithdrawScriptReviewResponse {
  var runtime = new Util.RuntimeOptions{};
  return withdrawScriptReviewWithOptions(request, runtime);
}

